[Haskell-cafe] Creating a list with do notation
Cody Goodman
codygman.consulting at gmail.com
Fri Jan 23 04:04:44 UTC 2015
List is a monad, does that mean i can create a list with do notation?
My intuition led me to believe this would work:
main = do
x <- return $ do
1
2
3
print (x :: [Int])
However it didn't. Is this possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20150122/e5c87f49/attachment.html>
More information about the Haskell-Cafe
mailing list