[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User-reserved element in byte code vectors
From: |
Lars Brinkhoff |
Subject: |
Re: User-reserved element in byte code vectors |
Date: |
14 May 2004 21:50:45 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Miles Bader writes:
> This is a patch that adds `curried functions' as discussed, using the
> #[...] syntax.
>
> (curry 'concat "The ")
> => #[curry concat "The "]
>
> (mapcar (curry 'concat "The ") '("a" "b" "c"))
> => ("The a" "The b" "The c")
>
> Does this look useful for your purposes Lars?
Yes, very!
Stefan Monnier writes:
> Just some nitpicking: `curry' is the action of taking a function of
> 2 arguments and turning it into a function of one arg that returns
> another function that expects the second arg.
When reading about currying in the context of Lisp, I've seen
this many times:
(defun curry (function &rest args1)
(lambda (&rest args2)
(apply function (append args1 args2))))
which I believe matches Miles' definition.
--
Lars Brinkhoff, Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting http://www.brinkhoff.se/
- Re: User-reserved element in byte code vectors, (continued)
- Re: User-reserved element in byte code vectors, Lars Brinkhoff, 2004/05/02
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/03
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/03
- Re: User-reserved element in byte code vectors, Lars Brinkhoff, 2004/05/05
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/05
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/06
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/06
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/06
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/14
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/14
- Re: User-reserved element in byte code vectors,
Lars Brinkhoff <=
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/14
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/14
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/15
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/15
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/17
- Re: User-reserved element in byte code vectors, Lars Brinkhoff, 2004/05/17
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/17
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/17
- Re: User-reserved element in byte code vectors, David Kastrup, 2004/05/17
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/17