Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can't apply normal functions to monads? Since when? Or what is a 'normal' function?


See all the functions which are funM. mapM, replicateM, etc... For a newbie having to use a different function to apply to a monad vs. a pure function is confusing and not necessary.


I'm just getting confused by the terminology. Those are pure functions too. And you have different functions because they're doing something completely different, operating on computational structures that are different from primitive values the 'normal' functions as you called them operate on.

It's like saying C++/Java etc. are confusing because you can only print certain values, but you can't print the print statement.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: