[Haskell-beginners] Random nub questions!
caseyrodarmor at gmail.com
Sun Sep 14 22:41:35 EDT 2008
Haskell is great! I have some questions:
Why is this:
a curried invocation of the the plus operator, but this:
(+ 1 2)
is an error?
And in the same vein, why is this a negative number:
instead of a curried invocation of the subtraction operator?
Why can't I do this:
1 `(+)` 2
even if it is a little pathological?
And this might be a little implementation dependent, although I'll hazard it
anyways: Why can't I assign to things when running GHCi? Given my experience
with C like languages, the first thing I wanted to do with GHCi was to start
assigning to variables. I know that Haskell is purely functional, but it
seems like it should be able to allow assignment from the interpreter by
raising errors on rebinding. (Just like in erl, the erlang interpreter.)
All the best,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners