Skip to content

Instantly share code, notes, and snippets.

View JiaHong-Lee's full-sized avatar

Lee Jia Hong JiaHong-Lee

View GitHub Profile
@JiaHong-Lee
JiaHong-Lee / cl-dash.org
Last active May 19, 2021 20:57
Common Lisp LOOP Constructs Implementations to Emacs Dash.el

There is an interesting question on reddit: “Why [are there] so many loop variations in CL?”[fn:12]. The OP mentions that he/she is looking for something comparable to Python’s for-loop and list comprehension; or maybe something similar to the dash.el Elisp library.

As an exercise, I want to achieve what Python and dash.el can do in Common Lisp. Then, in the end, I will try coming up with something that Python and dash.el cannot do with Common Lisp.

I’ll be comparing to dash.el[fn:13] version 2.18.1. You are advise to read the following exercises with the dash.el info file opened.

[fn:12] https://old.reddit.com/r/lisp/comments/lzt9yk/why_so_many_loop_variations_in_cl/

[fn:13] https://github.com/magnars/dash.el