UNPKG
@typed/effects
Version:
latest (6.8.0)
6.8.0
6.7.3
6.7.2
6.7.1
6.7.0
6.6.0
6.5.1
6.5.0
6.4.0
6.3.2
6.3.1
6.3.0
6.2.1
6.2.0
6.1.0
6.0.0
5.2.0
5.1.2
5.1.1
5.1.0
5.0.0
4.0.1
4.0.0
3.1.2
3.1.1
3.1.0
3.0.0
2.2.0
2.1.0
2.0.0
1.4.0
1.3.0
1.2.1
1.2.0
1.1.0
1.0.0
Generator-powered Effect management
github.com/TylorS/typed-prelude
TylorS/typed-prelude
@typed/effects
/
source
/
combinators
/
map.ts
7 lines
(5 loc)
•
193 B
text/typescript
View Raw
1
2
3
4
5
6
7
import
{
Arity1
}
from
'@typed/lambda'
import
{
Effects
}
from
'../Effect'
export
function
* map<E, A, B>(
fn
:
Arity1
<A, B>,
effect
:
Effects
<E, A>):
Effects
<E, B> {
return
fn
(
yield
* effect) }