Jacek Generowicz wrote:
# Imagine an activity which may be performed either by a computer, or
# by a human (alternatively, either locally, or remotely across a
# network). From Haskell's type system's perspective, these two will
# look completely different (most obviously, the human (or the
#
Warning! Incredibly hacky Haskell coming up!
Here's some code that seems to do the near same thing as your Python.
Below it is some sample output. A couple of differences are that the
secret number should be between 1 and 10, and whenever the computer
tries guess it just picks a random number
Excerpts from Jacek Generowicz's message of Fri Dec 17 20:17:30 -0500 2010:
Imagine an activity which may be performed either by a computer, or
by a human (alternatively, either locally, or remotely across a
network). From Haskell's type system's perspective, these two will
look completely
# Imagine an activity which may be performed either by a computer, or
# by a human (alternatively, either locally, or remotely across a
# network). From Haskell's type system's perspective, these two will
# look completely different (most obviously, the human (or the
# network) is wrapped in IO).