UNPKG

wonka

Version:

A fast push & pull stream library for Reason, loosely following the [callbag spec](https://github.com/callbag/callbag)

23 lines (18 loc) 563 B
'use strict'; var Curry = require("bs-platform/lib/js/curry.js"); function tap(f) { return (function (source) { return (function (sink) { return Curry._1(source, (function (signal) { if (typeof signal !== "number") { if (signal.tag) { f(signal[0]); } } return sink(signal); })); }); }); } exports.tap = tap; /* No side effect */