clojuredesign-podcast

Discussions around the Functional Design in Clojure podcast - https://clojuredesign.club/
nate 2020-09-25T20:57:39.000500Z

It's Friday, so here's a new episode, talking about the for macro: https://clojuredesign.club/episode/085-for-for-the-when/

👍 1
❤️ 2
jumar 2020-10-03T18:41:56.004300Z

You said that nil isn't added to the output collection but this seems to contradict it:

(for [x [1 2 nil 3]] 
  x)
;;=> (1 2 nil 3)
Am I missing something?

👍 1
nate 2020-10-06T19:00:43.011400Z

Huh, that is true, looks like you have to add a :when to skip the nils:

(for [x [1 2 nil 3] :when x] 
  x)
;;=> (1 2 3)

nate 2020-10-06T19:00:46.011600Z

good catch