IBM/fp-go
View on GitHub ↗ ★ 2,034 Go
Functional programming library for Go 1.24+, inspired by fp-ts. Uses generic type aliases for a clean, composable API. Provides Option, Either, Result, IO, IOResult, Reader, and ReaderIOResult monads, plus optics (Lens, Prism, Traversal) for immutable data manipulation. Supports Functor, Applicative, and Monad abstractions with do-notation-style
9 mentions on Hacker News by 8 people: 2 stories, 7 comments · first 2023-08-18 · latest 2026-03-13
20082026
-
…Rust-like language in the future and bridge the gap between the two languages. [1] - https://github.com/IBM/fp-go
comment by SleekoNiko · 2024-11-08 · in Functional Programming in Go -
…training to become productive. Here's an example of functional programming within Go taken far: https://github.com/IBM/fp-go/blob/main/samples/http/http_tes... . It basically adds a DSL on top of Go, which goes against its principles of…
comment by Cthulhu_ · 2023-09-20 · in Fixing for loops in Go 1.22 -
There exist at least some examples as part of the go docs, e.g. here https://pkg.go.dev/github.com/IBM/fp-go/either#pkg-examples or https://pkg.go.dev/github.com/IBM/fp-go@v1.0.19/array#pkg-ex... but there certainly could be more. Are…
comment by cleue · 2023-08-22 · in FP-Go: Functional programming library for Golang -
it has no error handling. also look at the API, what a joke: https://godocs.io/github.com/IBM/fp-go/function and check out the "constants": https://godocs.io/github.com/IBM/fp-go/function#pkg-variable...
comment by 38 · 2023-08-18 · in FP-Go: Functional programming library for Golang -
…CatFact]]("Log Result: %v")), ) result := data(context.Background()) fmt.Println(result()) https://github.com/IBM/fp-go/blob/main/samples/http/http_tes...
comment by 38 · 2023-08-18 · in FP-Go: Functional programming library for Golang -
…A7, A8, A9, A10]) ReaderIOEither[T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]] ( https://pkg.go.dev/github.com/IBM/fp-go/context/readerioeith... )
comment by Spiwux · 2023-08-18 · in FP-Go: Functional programming library for Golang -
True, however the README does link to this: https://github.com/IBM/fp-go/tree/main/samples
comment by dveeden2 · 2023-08-18 · in FP-Go: Functional programming library for Golang