
2 May
2009
2 May
'09
1:09 p.m.
On Sat, May 02, 2009 at 05:31:03PM +0100, Paul Keir wrote:
An example immediately follows that quotation on the wiki:
do text <- getLine if null text then putStrLn "You refuse to enter something?" else putStrLn ("You entered " ++ text)
Then, how about getMyLine = getLine >>= \text -> if null text then getMyLine else return m Can you, using functors, decide to run 'getLine' again or not? HTH, -- Felipe.