3 ms·
> Clojure has a bunch of functions with every and some in their names, which can be a bit confusing. In some? and some-> it refers to a value being something ot
by FPGAhacker 7y ago
> Clojure has a bunch of functions with every and some in their names, which can be a bit confusing. In some? and some-> it refers to a value being something other than nil, whereas in some and some-fn it means “the first one that applies”
I haven’t used any of the “some” functions much, but it seems to me you could read this was “the first one that is not nil” which would be consistent.
- alexott 7y agoManning’s “Clojure. The essential reference”[1] has quite good coverage of these functions. [1] https://www.manning.com/books/clojure-the-essential-reference https://www.manning.com/books/clojure-the-essential-referenc...