UNPKG

moy-fp

Version:
20 lines (17 loc) 461 B
import __ from '../../src/Function/__' /** * Task T => (a -> c) -> (a -> b) -> T a -> () */ import fork from '../../src/Functor/fork' import Task from '../../src/Functor/Task/index' // in fact, the test is not valid since Task is asynchronous test('fork(not using __)', () => { expect( fork(x => x - 1)(x => x + 1)(Task.of(12)) ).toBe(13) }) test('fork(using __)', () => { expect( fork(x => x - 1, __, Task.of(12))(x => x + 1) ).toBe(13) })