fp-go
fp-go copied to clipboard
fp-go is a collection of Functional Programming helpers powered by Golang 1.18+ generics.
Option
Improve the Option implementation by adding the following functions: * `FromPtr`: Lifts a pointer into an Option * `ToPtr`: "Unlifts" an Option into a pointer * `IsSomeAnd`: Check if the...
Pair
Add an implementation of a `Pair[A, B]` type equivalent to haskel's `(a, b)` * `New`: Constructor for the Pair type * `Fst`: Destructor returning the first element * `Snd`: Destructor...
Hi, I've tried to implements FP interface in go, but then I saw that you have achieve more implementations here. So I decide to use this package instead. But I...
In daily development, the Map, Filter, and Reduce functions provided by FP are indeed very useful, but there may be identical elements in the arrays or slices used in business,...