sanctuary-js / sanctuary

:see_no_evil: Refuge from unsafe JavaScript
https://sanctuary.js.org
MIT License
3.03k stars 94 forks source link

Add more folds #581

Closed masaeedu closed 5 years ago

masaeedu commented 5 years ago

It'd be nice to have deconstructors for more sorts of things in JS. A couple examples from discussions in the gitter room:

array :: x -> (a -> [a] -> x) -> [a] -> x
boolean :: x -> x -> Boolean -> x

Feel free to add more in the comments.