-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
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
Add fmap built-in #237
Comments
Is the intention here a variation on |
@Sitwon Yep, that's exactly it! There was a discussion on Gitter that this stems from about adding more FP-style tools to Coconut. The rationale is that if you added a function like the above, it would make it a lot easier to do this:
|
An interesting question--should there also be a |
This doesn't work on lists as expected though:
yields
|
@hasufell Agreed. I just finished a much more complicated version that should do the trick, however. I've put it up on |
On
|
@hasufell I have no idea how you managed to trigger that error--why are you trying to compile |
Because that's what my package manager does when I install coconut. |
@hasufell Huh. What package manager are you using? Are you not installing Coconut through Regardless, I changed the code around a bit and that file should compile fine on 2.7 now, though it still should never be run except on Python 3. Try it now! |
fmap
would look like:The text was updated successfully, but these errors were encountered: