Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Manning’s “Clojure. The essential reference”[1] has quite good coverage of these functions.

[1] https://www.manning.com/books/clojure-the-essential-referenc...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: