DusanKasan / Knapsack

Collection pipeline library for PHP
http://dusankasan.github.io/Knapsack/
MIT License
535 stars 56 forks source link

first throws for an empty collection #69

Open akond opened 4 years ago

akond commented 4 years ago

In clojure (first nil) and (first ()) returns nil. Knapsack throws, which is quite disconcerting. It would be great if this behavior was consistent with how clojure does this.