FSharpx.Collections icon indicating copy to clipboard operation
FSharpx.Collections copied to clipboard

Add static members for F#+ generic operators

Open gusty opened this issue 5 years ago • 1 comments

Description

This library seems to be easy to integrate with F#+ we just need to add the required static members, no need to add any dependency.

Repro steps

For example, looking at the required signature for map in order to be able to use a generic map over a Lazy List, we just need to add:

 static member Map (x: LazyList<'T>, f:'T->'U) : LazyList<'U> = LazyList.map f x

then, we can add an attribute to "hide" it from the tooling.

We can also add <*> and >>= which are not yet implemented.

Doing this for most collections will provide a way to use generic operations over these collections, also a way to derive automatically computation expressions.

gusty avatar Aug 02 '19 16:08 gusty

@gusty sorry for long silence. I think github forgot to notify me. This seems like a good feature. I'm happy to consider a PR. Tests appreciated.

jackfoxy avatar Oct 12 '19 17:10 jackfoxy