|
From: | Bozhidar Batsov |
Subject: | Re: seq-thread-first/last |
Date: | Fri, 30 Jan 2015 14:58:18 +0200 |
David Kastrup <address@hidden> writes:
> Hard to corroborate if the people mentioning their wishes don't bother
> mentioning what their desired functions are supposed to do.
Do you mean me? I thought my explanation was clear. Anyway, the
semantic would be like this:
--8<---------------cut here---------------start------------->8---
(defmacro seq-thread-first (seq &rest forms)
(declare (indent 1))
(let ((x (make-symbol "x")))
`(seq-map (lambda (,x) (thread-first ,x ,@forms)) ,seq)))
--8<---------------cut here---------------end--------------->8---
though that's probably not the most efficient implementation.
seq-thread-last analog.
Example:
(seq-thread-first (number-sequence 1 3)
(* 10) (+ 1))
==> (11 21 31)
Or was your critique about use cases?
Thanks,
Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |