thanks!
Ivan Lazar Miljenovic wrote: > > 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 > > ----- fac n = foldr (*) 1 [1..n] -- View this message in context: http://old.nabble.com/Why-cannot-i-add-the-%60let%60-declaration---tp27381811p27382334.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
