|
|
|
|
|
by dchest
2638 days ago
|
|
The first time I saw `it` in a similar construction was in Arc language's aif macro: (mac aif (expr . body)
`(let it ,expr
(if it
,@(if (cddr body)
`(,(car body) (aif ,@(cdr body)))
body))))
HN uses it quite a lot, e.g.: (defop logout req
(aif (get-user req)
(do (logout-user it)
(pr "Logged out."))
(pr "You were not logged in.")))
|
|