Skip to content

Instantly share code, notes, and snippets.

@dumconstantin
Last active July 26, 2016 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dumconstantin/7b300192b3fa35b95829154456abd2ce to your computer and use it in GitHub Desktop.
Save dumconstantin/7b300192b3fa35b95829154456abd2ce to your computer and use it in GitHub Desktop.
var PS = {};
// ....
(function(exports) {
var Data_Maybe = PS["Data.Maybe"];
var Control_Apply = PS["Control.Apply"];
var Data_Functor = PS["Data.Functor"];
var add = function (x) {
return function (y) {
return x + y | 0;
};
};
var result = Control_Apply.apply(Data_Maybe.applyMaybe)
(Data_Functor.map(Data_Maybe.functorMaybe)(add)
(new Data_Maybe.Just(1)))
(new Data_Maybe.Just(2));
exports["result"] = result;
})(PS["Main"] = PS["Main"] || {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment