|
|
|
|
|
by ryuuseijin
3369 days ago
|
|
There is a neat macro I've been using to solve problems like the nested if-lets in the post: https://github.com/Engelberg/better-cond (b/cond
:let [x (foo)]
(not x) (do (log "foo failed") false)
:let [y (bar x)]
(not y) (do (log "bar failed") false)
:let [z (baz x y)]
(not z) (do (log "baz failed") false)
:else (do (qux x y z) (log "it worked") true))
|
|