
30 Jan
2010
30 Jan
'10
2:39 a.m.
find_the_day sDay 0 = sDay find_the_day sDay nDay = if (is_trade_day $ nextDay sDay) then find_the_day (nextDay sDay) (nDay - 1) else find_the_day (nextDay sDay) nDay nextDay sDay = addDays 1 sDay The above code works fine. But the following always reports `compiling error`: 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 Any suggestion is appreciated! ----- fac n = foldr (*) 1 [1..n] -- View this message in context: http://old.nabble.com/Why-cannot-i-add-the-%60let%60-declaration---tp2738181... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.