Skip to content

Introduce line-up-first and line-up-last macros

Andrea Richiardi requested to merge thread-macros into alexandria-2

This patch introduces the line-up-first and line-up-last macros in control-flow. The macros have been popularized by Clojure and afterwards adopted in Emacs Lisp (see thread-first and thread-last in subr-x.el).

This implementation is a port of the latter, where we use a common line-up-iter(ative) tail recursive function for computing the results. The choice of the full name was made in the spirit of the library, conservatively avoiding new syntax like -> or ->>.

Edited by Andrea Richiardi

Merge request reports