Subject: Re: 360 ass 1

> 
> Hi,
>         Just want to ask a question:
> 
>         I wrote:
> 
> countSales :: Month -> Amount -> Amount -> Int
> countSales (n+1) l u =
>         if (.....) then
>                1+ (....) <--------- this is line 45
>
> then an error message occurs which is:
> ERROR "ass1" (line 45): Syntax error in expression (unexpected token)
> 
>         Do you know why gofer doesn't allow me to use recursion here?
> 
>         Thanks a lot!!!!!

When you define a function
   fun a b c = ....
make sure that *all* of the function definition is to the right
of the "="-sign. This is OK:
   fun a b c =  ...............
                ...............
                ...............
but this is not
   fun a b c =  ...............
           ...............
                ...............

/CC

___________________________________________________________________________
Christian Collberg      | Email: c_collberg@cs.auckland.ac.nz
Computer Science Dept   | Fax:   +64-9-373-7453
University of Auckland  | Phone: +64-9-373-7599 x 6137
Private Bag 92019,      | WWW:   http://www.cs.auckland.ac.nz/~collberg/
Auckland, NZ            |
___________________________________________________________________________
"Education is an admirable thing, but it is well to remember from time
to time that nothing that is worth knowing can be taught." - Oscar Wilde
___________________________________________________________________________