1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-12-09 23:11:40 +02:00
Files
fp-go/v2/io/types.go
Dr. Carsten Leue ff48d8953e fix: implement some missing methods in reader io
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
2025-12-04 13:50:25 +01:00

26 lines
595 B
Go

package io
import (
"iter"
M "github.com/IBM/fp-go/v2/monoid"
"github.com/IBM/fp-go/v2/pair"
"github.com/IBM/fp-go/v2/reader"
S "github.com/IBM/fp-go/v2/semigroup"
)
type (
// IO represents a synchronous computation that cannot fail
// refer to [https://andywhite.xyz/posts/2021-01-27-rte-foundations/#ioltagt] for more details
IO[A any] = func() A
Pair[L, R any] = pair.Pair[L, R]
Kleisli[A, B any] = reader.Reader[A, IO[B]]
Operator[A, B any] = Kleisli[IO[A], B]
Monoid[A any] = M.Monoid[IO[A]]
Semigroup[A any] = S.Semigroup[IO[A]]
Seq[T any] = iter.Seq[T]
)