Skip to content

Instantly share code, notes, and snippets.

@UserGalileo
Created April 14, 2020 17:21
Show Gist options
  • Select an option

  • Save UserGalileo/7f4cebc0eb6d004111433439d277de53 to your computer and use it in GitHub Desktop.

Select an option

Save UserGalileo/7f4cebc0eb6d004111433439d277de53 to your computer and use it in GitHub Desktop.
Functions yielding monadic values
// Let's just use the simplest monad, Identity
import { Identity } from 'wherever';
// These are our new elements
const f = x => Identity(x + 1);
const g = x => Identity(x + 2);
const h = x => Identity(x + 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment