miniblog.
← Back to all posts
Mar 5, 2017 at 23:11
To my surprise, mapcar is so fast (it's an elisp primitive) that creating lambdas is cheaper than using a loop:
dolist vs mapcar
dolist vs mapcar. GitHub Gist: instantly share code, notes, and snippets.
Wilfred Hughes
Related Posts
Jul 6, 2018 at 12:21
Neat elisp feature I learnt today: because closures are just lists, you can manually construct them and call them as functions: (mapcar '(closure (t) (x) (1+ x)) '(1 2 3)) ;; => '(2 3 4)
Wilfred Hughes
Shared words: mapcar, elisp Score: 48.8
Jan 3, 2016 at 21:30
'Fold is better than looping because the loop is incidental' yes, but using lambda is incidental too! Perhaps an accumulate macro is better?
Wilfred Hughes
Shared words: lambdas, using, loop Score: 40.7
Mar 8, 2018 at 19:21
Fun post on implementing a JIT for elisp, with a great introduction to calling conventions on elisp primitives:
Emacs JIT Calling Convention — The Cliffs of Inanity
tromey.com/blog/?p=999
Wilfred Hughes
Shared words: elisp, primitive Score: 40.5