News for hackers. Stuff that matters.
Re:The Monad Challenges: Jump start your understanding of mo... by rntz on Tuesday January 19, 2016 @08:53PM (#10935536)
Ignore the instructions and grab putStrLn if you need it in order to check your work. The instructions about not using other modules are there to avoid you "cheating". Looking at your work is definitely not cheating and will not prevent you from learning :).

Also, just typing "fiveRands" and hitting ENTER at the repl will show you the value of fiveRands (or any other expression).

Re:The Monad Challenges: Jump start your understanding of mo... by dllthomas on Tuesday January 19, 2016 @11:48PM (#10936139)
"or any other expression"

To be more precise, any other expression with an appropriate type. That's `a` or `IO a`, where `a` is an instance of `Show`.

Most things that can reasonably be Shown already have a `Show` instance, but some things (like functions) can't really.

This is relevant when the REPL shows an error like:

    <interactive>:2:1:
        No instance for (Show (t0 -> a0))
          (maybe you haven't applied enough arguments to a function?)
          arising from a use of ‘print’
        In the first argument of ‘print’, namely ‘it’
        In a stmt of an interactive GHCi command: print it