From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: seq-thread-first/last Date: Fri, 30 Jan 2015 13:33:42 +0100 Message-ID: <87pp9wwiqh.fsf@web.de> References: <878uglwmra.fsf@petton.fr> <87iofoof2j.fsf@udel.edu> <87k304ef9k.fsf@petton.fr> <87iofozfry.fsf_-_@web.de> <87fvaseaxe.fsf@petton.fr> <87wq44a2f3.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422621243 13866 80.91.229.3 (30 Jan 2015 12:34:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 12:34:03 +0000 (UTC) Cc: Nicolas Petton , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 30 13:34:03 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YHAls-0007Gu-VS for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 13:34:01 +0100 Original-Received: from localhost ([::1]:36374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHAls-00032A-80 for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 07:34:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHAlo-0002xh-Di for emacs-devel@gnu.org; Fri, 30 Jan 2015 07:33:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHAln-00082g-KT for emacs-devel@gnu.org; Fri, 30 Jan 2015 07:33:56 -0500 Original-Received: from mout.web.de ([212.227.15.14]:52297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHAlj-00080h-3s; Fri, 30 Jan 2015 07:33:51 -0500 Original-Received: from drachen.dragon ([90.186.186.100]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0MTgqe-1Y8Gol1UWm-00QVYe; Fri, 30 Jan 2015 13:33:48 +0100 In-Reply-To: <87wq44a2f3.fsf@fencepost.gnu.org> (David Kastrup's message of "Fri, 30 Jan 2015 13:17:04 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:tYYSNEr2l5NopbQPvV4knPRXyXEVx8tlbshrtys6H7txJlgsYQL i8XUJRyJ+HiMmarUHXiTuDBsx0HWKNkVIDP3Wvrs4bJOVVHZ7htdo3FrXj7LWnOU1pro+X0 6zrFrpkZbrNWT+WIb5wOq+0oY4tId86scnFVMJGMcySyG1g3AHlZOzReR5DOUUT/yMUtQor D6fP88/pKcYpDNlI/ARpQ== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.14 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182052 Archived-At: David Kastrup 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.