Kent M Pitman wrote: [1999-08-04 17:24 +0000]
> > Vassil Nikolov <········@poboxes.com> writes:
[about ADJOIN]
> > > This (standard) function in Common Lisp has :TEST and :KEY arguments.
> > > What would Scheme's way be of providing such capabilities?
[...]
> Well, I think the more Scheme-ish thing would be to make a function which
> dispensed other functions. Probably they would not make it keyworded, but
> rather positional. It would probably look like
>
> (define (adjoin-dispenser tst ky)
> (lambda (elemnt lst)
> ...))
>
> And then you'd either do
>
> ((adjoin-dispenser equal? identity) new-guy some-respository)
>
> or else
>
> (define adjoin-using-equal (adjoin-dispenser equal? identity))
> ... (adjoin-using-equal new-guy some-respository) ...
Thank you, this is an answer exactly to my question.
Vassil Nikolov
Permanent forwarding e-mail: ········@poboxes.com
For more: http://www.poboxes.com/vnikolov
Abaci lignei --- programmatici ferrei.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.