Skip to content

Instantly share code, notes, and snippets.

@vendethiel
Created Apr 20, 2021
Embed
What would you like to do?
Not a very good implementation of a not very impressive feature
(defmacro dart (&rest xs)
(flet ((wrap (x) (if (and (consp x) (eq 'if (car x)))
`(if ,(cadr x) (list ,(caddr x)))
`(list ,x))))
`(mapcan #'identity (list ,@(mapcar #'wrap xs)))))
(princ (list-length (dart
1
(if t 0))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment