[Hugs-users] Excerpt from "Yet another Haskell Tutorial"

aldirithms at gmx.net aldirithms at gmx.net
Sat Aug 5 09:11:19 EDT 2006


Hello, (and sorry for the preceding accidental empty message),


I'd like to ask a question concerning a following passage in
"Yet another Haskell Tutorial" that ushers in the topic of monads:

<<After all, suppose you have a function that reads a string from the keyboard. Ifyou call this function twice, and the user types something the first time and something else the second time, then you no longer have a function, since it would return two different values.>>

How do I have to interpret this? I cannot make sense of it for I do not see where the definition of a function that I know is violated. I view it that way: The string is just a kind of argument to the string-reading function and that different strings (i.e. different arguments) yield different return values is a commonplace phenomenon with functions, isn't it? How do I have to alter this (over?)simple interpretation to see the point the author wants to make?

Thank you very much in advance.

Christian
-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl


More information about the Hugs-Users mailing list