[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
What about seq-slice? (Was: Would seq-range and seq-mapcat be useful?), Mark Oteiza, 2015/01/30
- Re: What about seq-slice? (Was: Would seq-range and seq-mapcat be useful?), Nicolas Petton, 2015/01/30
- Re: seq-thread-first/last, David Kastrup, 2015/01/30
- Re: seq-thread-first/last,
Nicolas Petton <=
- Re: seq-thread-first/last, Michael Heerdegen, 2015/01/30
- Re: seq-thread-first/last, Bozhidar Batsov, 2015/01/30
- Re: seq-thread-first/last, Artur Malabarba, 2015/01/30
- Re: seq-thread-first/last, Michael Heerdegen, 2015/01/30
Re: What about seq-slice?, Mark Oteiza, 2015/01/30