loading...

re: Explain Pure Functions Like I'm Five VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Just out of curiosity, how would you implement a pure function of console.log? I have no experience in functional languages.
 

You can't, so you hide it. In Elm's case, it's called Debug.log to emphasize that it's not something to be used commonly. Essentially it looks like the identity function (takes an argument and gives it back) except that it logs it to the console.

More: package.elm-lang.org/packages/elm-...

code of conduct - report abuse