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

This is false. getChar is a constant.



I am confused :S

From your other post: "In both Gluon and Haskell, functions without arguments can be represented as functions over the unit type: f: () -> SomeType"

Isn't `f` a constant here too?, how is this different than getChar? (I get I don't understand something here but not sure what)


`getChar` is not of type `() -> SomeType`, but directly of type `SomeType`.

(Though yes, `f` also is a constant... it's just a constant that happens to be a function, which `getChar` is not.)




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

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

Search: