zaxis <[email protected]> writes:
> find_the_day sDay 0 = sDay
> find_the_day sDay nDay = 
>     let nextDay = addDays 1 sDay
>     if (is_trade_day $ nextDay)
>     then find_the_day nextDay (nDay - 1)
>     else find_the_day nextDay nDay

The correct syntax is let ... in ...; you've forgotten the "in", so
something like this:

,----
| find_the_day sDay 0 = sDay
| find_the_day sDay nDay = 
|     let nextDay = addDays 1 sDay
|     in if (is_trade_day $ nextDay)
|        then find_the_day nextDay (nDay - 1)
|        else find_the_day nextDay nDay
`----

Note that in do-blocks you don't need the `in'; in "normal" code you do.

-- 
Ivan Lazar Miljenovic
[email protected]
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to