Rayden includes utilities to aid in the writing of Common Lisp code. In particular, there are convenience functions and macros (and re-exports) for writing functional code.
The package depends on the public domain :alexandria and and MIT License :arrow-macros packages.
Install Rayden by saving the repository into your local lisp
directory, such as ~/.roswell/local-projects/, and loading it from
there. For example, once saved in the local lisp directory, you may
load it using (ql:quickload :rayden) or (asdf:load-system "rayden").
Exports:
- :drop => removes
nitems from head of a list - :take => returns a list of the first
nitems from the head of a sequence - :iota => from
alexandria - :curry => from
alexandria - :-> => from
arrow-macros - :->> => from
arrow-macros - :as-> => from
arrow-macros - :len=1 => checks if length of list is one
- :length=1 => checks if length of sequence is one
- :string-split => splits string
After installing rove (ros install rove), execute the following command:
rove rayden.asdTested on SBCL, CCL, ECL, and ABCL on GNU/Linux and MacOS (both on AMD64). Also tested on SBCL on Windows (on AMD64).
ros -Q benchmarks.rosThese (naive) benchmarks, using :trivial-benchmarks, show that :len=1
and :length=1 are significantly faster than (lambda (x) (= 1 (length
x))) on CCL, ECL, and ABCL for (long) lists. There is little (or no)
advantage to using :length=1 in other circumstances.
:length=1 and :len=1 are not faster for long lists in SBCL, likely
because SBCL optimizes calls to length or otherwise caches results.
Released under the MIT-0 License, (c) Jin-Ho King 2021.