Code | tehblog

August 23, 2015

What to Pass: a Var or IFn?

Mapping a function over a channel You have a function you are developing: (defn name-string "Gives you the name string from a suitable map" [{:keys [first-name]}] first-name) and you want to run this on maps you get over, say, a socket. Thus you shove it up a channel with an attached transducer of (map name-string) (or with a pipeline of the actual data channel, for the indirection). A Problem Arises Now, you want to incorporate the last name as an initial. ... Read more

No Rights Reserved Ricardo Gomez