Last active
July 26, 2016 10:51
-
-
Save dumconstantin/7b300192b3fa35b95829154456abd2ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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