emacs-devel
[Top][All Lists]
Advanced

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

Re: [elpa] master 96e61a9 26/26: Add packages/darkroom by merging its up


From: João Távora
Subject: Re: [elpa] master 96e61a9 26/26: Add packages/darkroom by merging its upstream subtree
Date: Sun, 21 Dec 2014 20:23:05 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (darwin)

Stefan Monnier <address@hidden> writes:

>> +  (mapc #'(lambda (w)
>> +            (with-selected-window w
>> +              (darkroom--set-margins)))
>> +        (get-buffer-window-list (current-buffer))))
>
> I recommend the use of `dolist' instead of `mapc' when the body of the
> loop is provided by an anonymous function and we're looping over a list.
>
> If the compiler could tell that we're looping over a list, it could
> auto-transform the mapc call into a dolist (which is slightly more
> efficient), but having to expend it to a loop that handles both lists
> and arrays (like `mapc' does) makes the resulting code no more efficient
> than just using `mapc'.
>
Alright, makes sense. What if I use `(cl-loop for w in ...list...)`
which is my preferred cl-idiom anyway?

João





reply via email to

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