emacs-devel
[Top][All Lists]
Advanced

[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/




reply via email to

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