benbjohnson / immutable

Immutable collections for Go
MIT License
713 stars 32 forks source link

Higher-order procedures #27

Open MSE99 opened 1 year ago

MSE99 commented 1 year ago

I know that the goal of this project is to provide a clean and efficient minimal API but i think having for example a some high order procedures like Filter will help improve usage and dx.

benbjohnson commented 1 year ago

I'm open to a proposal for higher-level functions (e.g. Filter, Map(), etc). I don't commit a lot of time on this repo so I don't have the bandwidth to implement it but I'm open to other folks implementing something.

MSE99 commented 1 year ago

Should we pass other information (other than the current item) about the list to Filter predicate?

laher commented 1 year ago

@MSE99 I have prototyped some HOFs here: https://github.com/benbjohnson/immutable/pull/37 ? Does they seem like what you were hoping for?