n日後を返す関数を返す関数
http://ja.doukaku.org/29/より。カリー化そのものです。
module Main (main) where import System.Time nDaysLater :: Int -> ClockTime -> ClockTime nDaysLater n = addToClockTime noTimeDiff { tdDay = n } main :: IO () main = do let fiveDaysLater = nDaysLater 5 time <- getClockTime print time -- => Sun Jul 22 14:24:54 2007 print $ fiveDaysLater time -- => Fri Jul 27 14:24:54 2007