reasonml-community / belt

MIT License
49 stars 1 forks source link

Reduce / Fold without an initial value #29

Closed RawToast closed 6 years ago

RawToast commented 6 years ago

I couldn't find a function for folding a list without a default value in either Js.List or Belt.List. I was expecting to find a method with signature of:

(List('a), (a', a' => a')) => 'a

It would be nice for this to be included in the std.lib and I hope I've raised this in the correct place!

RawToast commented 6 years ago

On second thoughts, that would have to an exception throwing function... I don't want to propose that!