Functor
0.40.0
Definitions
def
$>
[fab]
(
ma :
f[a]
x :
b
)
: f[b]
\ Pure
with
Functor[f]
$>
is an operator alias for replace
.
def
<$
[afb]
(
x :
a
ma :
f[b]
)
: f[a]
\ Pure
with
Functor[f]
<$
is the operator $>
with its arguments flipped.
def
<$$>
[maefb]
(
x :
m[a]
f :
a -> b \ ef
)
: m[b]
\ ef
with
Functor[m]
<$$>
is the operator <$>
with its arguments flipped.
def
<$>
[aefbm]
(
f :
a -> b \ ef
x :
m[a]
)
: m[b]
\ ef
with
Functor[m]
<$>
is an operator alias for map
.
def
ignore
[ma]
(
s :
m[a]
)
: m[Unit]
\ Pure
with
Functor[m]
Replaces the value a
in s
with Unit
preserving the structure of s
.
This function is typically used to discard the return value of computing s
.
def
replace
[abm]
(
s :
m[a]
x :
b
)
: m[b]
\ Pure
with
Functor[m]
Replaces the value a
in s
by the given value x
preserving the structure of s
.