1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-11-25 22:21:49 +02:00
Files
Dr. Carsten Leue 107618cef8 fix: better doc
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
2025-11-06 09:24:09 +01:00
..
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-11-06 09:24:09 +01:00
2025-03-01 23:07:56 +01:00
2025-03-01 23:07:56 +01:00
2025-11-06 09:24:09 +01:00
2025-03-10 00:06:07 +01:00

Functional programming library for golang V2

Go 1.24 introduces generic type aliases which are leveraged by V2.

⚠️ Breaking Changes

  • use of generic type aliases which requires go1.24
  • order of generic type arguments adjusted such that types that cannot be inferred by the method argument come first, e.g. in the Ap methods
  • monadic operations for Pair operate on the second argument, to be compatible with the Haskell definition

Simplifications

  • use type aliases to get rid of namespace imports for type declarations, e.g. instead of
import (
    ET "github.com/IBM/fp-go/v2/either"
)

func doSth() ET.Either[error, string] {
    ...
}

you can declare your type once

import (
    "github.com/IBM/fp-go/v2/either"
)

type Either[A any] = either.Either[error, A]

and then use it across your codebase

func doSth() Either[string] {
    ...
}
  • library implementation does no longer need to use the generic subpackage, this simplifies reading and understanding of the code