@rgeraldporter/

Identity Monad Example

Nodejs

No description

fork
loading
Files
  • index.js
  • Identity.js
index.js
1
2
3
4
5
6
7
8
9
10
const { Identity } = require('./Identity');

const one = Identity.of(1);
const two = one.map(a => a + 1);

console.log(one.inspect());
// > Identity(1)

console.log(two.inspect());
// > Identity(2)
node v10.16.0