>    (when-let [s (seq coll)]
>      (let [run (cons (first s) (take-while #(not= value (f %)) (next
> s)))]
>       (cons run (partition-when f value (seq (drop (count run) s))))
>      )
>    )
>  )
> )
...
> What test?

(seq coll) is the test here. when-let (and if-let, etc) bind only when
the right hand side is truthy.

(when-let [x true]
  (println "this prints"))

(when-let [x false]
  (println "this does not print"))

It's a common shortcut for:

(let [x (something-something)]
  (when x
     ....))

jack.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to