emacs-devel
[Top][All Lists]
Advanced

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

Re: seq-thread-first/last


From: Nicolas Petton
Subject: Re: seq-thread-first/last
Date: Fri, 30 Jan 2015 13:25:05 +0100
User-agent: mu4e 0.9.9.6pre3; emacs 24.4.1

David Kastrup <address@hidden> writes:

>> thread-first/last are not in elisp though, are they?
>
> Hard to corroborate if the people mentioning their wishes don't bother
> mentioning what their desired functions are supposed to do.

Sorry about that. Here's the docstring of `thread-first' from subr-x.el:

Thread FORMS elements as the first argument of their successor.
Example:
    (thread-first
      5
      (+ 20)
      (/ 25)
      -
      (+ 40))
Is equivalent to:
    (+ (- (/ (+ 5 20) 25)) 40)
Note how the single `-' got converted into a list before
threading.

Cheers,
Nico
-- 
Nicolas Petton
http://nicolas-petton.fr




reply via email to

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