guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extending apply


From: Andy Wingo
Subject: Re: Extending apply
Date: Mon, 22 Jan 2007 10:46:15 +0100

Hi Ian,

On Sun, 2007-01-21 at 11:40 +0000, Ian Grant wrote:
> Dear, happy guile-users

:)

> The scmutils package for SICM allows one to do things like apply arguments to 
> a vector which evaluates to a vector of results of applying the arguments to 
> each element in turn.

Have you tried generics? A couple minutes of tinkering didn't give me
the right incantation, but it should be something like:

(use-modules (oop goops))
(define apply (ensure-generic apply))
(define-method (apply proc (x <vector>)) ...)

Cheers,

Andy
-- 
http://wingolog.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]