RSSAmplifier

(untitled) · Jul 26, 2021

condev - like cond but different

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

Hopefully the docstring explains this well enough: ( defmacro condev "Takes clauses in the same style as `cond` but, if the left side is truthy, will execute the right side of the expressions as a function which gets the result of evaluation of the left side." [ & clauses ] ( assert ( even? ( count clauses ))) ( let [ pstep ( fn [[ test step ]] ` ( when-let [ r # ~ test ] ( ~ step r # )))] ` (…

Read on philjackson.github.io

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.