UNPKG

fluture

Version:

FantasyLand compliant (monadic) alternative to Promises

8 lines (6 loc) 190 B
import {isFuture} from '../future'; import {throwInvalidFuture} from '../internal/throw'; export function swap(m){ if(!isFuture(m)) throwInvalidFuture('swap', 0, m); return m.swap(); }