Skip to content

Instantly share code, notes, and snippets.

@dypsilon
dypsilon / reader-t.js
Last active October 28, 2020 22:25
A simple example of using Reader transformer to combine reader and future.
const {tagged} = require('daggy');
// const
const K = (a) => (b) => a;
// Reader Transformer
module.exports = (M) => {
const ReaderT = tagged('run');
ReaderT.lift = (m) => ReaderT(K(m));