Hacker News new | past | comments | ask | show | jobs | submit login

In Haskell, getChar isn't a function (something of type a -> b), its type is IO Char

http://hackage.haskell.org/package/base-4.11.1.0/docs/Prelud...

It represents an interaction with the outside world that results in a Char when you perform it. It isn't a function because in Haskell functions must be pure (with no side effects).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: