[Haskell-beginners] having trouble with helloworld style program
David Place
d at vidplace.com
Mon Aug 8 18:08:29 CEST 2011
>> main =do
>> x<-getLine
>> y<-return x
>> print $ stringToInt y
>
> This is exactly equivalent to the other methods, but has the additional
> 'return', which is a no-op. Please do not suggest such a style.
>
Really? Without the return it will not work. So, it isn't a noop. Stylistically, I like it better than the 'let' in 'do' notation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110808/d87520f7/attachment.htm>
More information about the Beginners
mailing list