mirror of
https://github.com/IBM/fp-go.git
synced 2025-11-29 22:38:29 +02:00
fix: complete migration of IO
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -22,6 +22,8 @@ import (
|
||||
)
|
||||
|
||||
// Bind creates an empty context of type [S] to be used with the [Bind] operation
|
||||
//
|
||||
//go:deprecate
|
||||
func Do[GS ~func() S, S any](
|
||||
empty S,
|
||||
) GS {
|
||||
@@ -29,6 +31,8 @@ func Do[GS ~func() S, S any](
|
||||
}
|
||||
|
||||
// Bind attaches the result of a computation to a context [S1] to produce a context [S2]
|
||||
//
|
||||
//go:deprecate
|
||||
func Bind[GS1 ~func() S1, GS2 ~func() S2, GT ~func() T, S1, S2, T any](
|
||||
setter func(T) func(S1) S2,
|
||||
f func(S1) GT,
|
||||
@@ -42,6 +46,8 @@ func Bind[GS1 ~func() S1, GS2 ~func() S2, GT ~func() T, S1, S2, T any](
|
||||
}
|
||||
|
||||
// Let attaches the result of a computation to a context [S1] to produce a context [S2]
|
||||
//
|
||||
//go:deprecate
|
||||
func Let[GS1 ~func() S1, GS2 ~func() S2, S1, S2, T any](
|
||||
key func(T) func(S1) S2,
|
||||
f func(S1) T,
|
||||
@@ -54,6 +60,8 @@ func Let[GS1 ~func() S1, GS2 ~func() S2, S1, S2, T any](
|
||||
}
|
||||
|
||||
// LetTo attaches the a value to a context [S1] to produce a context [S2]
|
||||
//
|
||||
//go:deprecate
|
||||
func LetTo[GS1 ~func() S1, GS2 ~func() S2, S1, S2, B any](
|
||||
key func(B) func(S1) S2,
|
||||
b B,
|
||||
@@ -66,6 +74,8 @@ func LetTo[GS1 ~func() S1, GS2 ~func() S2, S1, S2, B any](
|
||||
}
|
||||
|
||||
// BindTo initializes a new state [S1] from a value [T]
|
||||
//
|
||||
//go:deprecate
|
||||
func BindTo[GS1 ~func() S1, GT ~func() T, S1, T any](
|
||||
setter func(T) S1,
|
||||
) func(GT) GS1 {
|
||||
@@ -76,6 +86,8 @@ func BindTo[GS1 ~func() S1, GT ~func() T, S1, T any](
|
||||
}
|
||||
|
||||
// ApS attaches a value to a context [S1] to produce a context [S2] by considering the context and the value concurrently
|
||||
//
|
||||
//go:deprecate
|
||||
func ApS[GS1 ~func() S1, GS2 ~func() S2, GT ~func() T, S1, S2, T any](
|
||||
setter func(T) func(S1) S2,
|
||||
fa GT,
|
||||
|
||||
Reference in New Issue
Block a user