> 2. I tried playing around with the foo function I was working with
> last time, and am getting a different error now:
> foo :: Int -> [Char]
> foo 0 = []
> foo x = ['1'] ++ foo(x div 10)
You should have typed "9 div 3" at the listener and you'd have figured out
your error. No infix operators in haskell are just plane words. The
convention is to add the obtuse accent mark around identifiers, a la:
9 `div` 3
foo `bind` bar
If you remove the accent marks, you have a non-infix operator, so while 9
div 3 is invalid, div 9 3 is not.