We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello
I am really new to the monad universe, and in fact using Monet.js to explore it.
I stumbled on an "Illegal state exception" while running
function nullFunc() { return null } Some("a").ap(Some(nullFunc)); // throws "Illegal state exception" from Maybe.fn.Maybe.init
The problem seems to come from the fact that the map function listed hereafter composer _this.of_ with fn (my nullFunc).
Looking though the spec I did not see any requirement that ap() should be passed a non-null returning function. Did I miss something
Why use this.of and not this.fromNull in map ?
var map = function (fn) { return this.bind(this.of.compose(fn)) }
Sorry I didn't proposed the PR, but I have miles to cover and the subject before
The text was updated successfully, but these errors were encountered:
It is proper behaviour actually -- see discussion here: https://github.com/cwmyers/monet.js/issues/53
Sorry, something went wrong.
No branches or pull requests
hello
I am really new to the monad universe, and in fact using Monet.js to explore it.
I stumbled on an "Illegal state exception" while running
The problem seems to come from the fact that the map function listed hereafter composer _this.of_ with fn (my nullFunc).
Looking though the spec I did not see any requirement that ap() should be passed a non-null returning function. Did I miss something
Why use this.of and not this.fromNull in map ?
Sorry I didn't proposed the PR, but I have miles to cover and the subject before
The text was updated successfully, but these errors were encountered: