[Haskell-cafe] A Modest Records Proposal

Christopher Done chrisdone at googlemail.com
Mon Apr 2 14:56:53 CEST 2012


On 2 April 2012 14:41, Michael Snoyman <michael at snoyman.com> wrote:
> import Data.Time
>
> main = do
>    now <- getCurrentTime
>    let (_, month, day) = toGregorian $ utctDay now
>    putStrLn $
>        if month == 4 && day == 1
>            then "It's a joke"
>            else "It's real"

import Data.Time
main = do
   now <- getCurrentTime
   let (_, month, day) = toGregorian $ utctDay now
   putStrLn $
       if month == 4 && day == 1
           then "It's a joke"
           else "It's real. (This output is not a joke. But run this
program again to be sure.)"



More information about the Glasgow-haskell-users mailing list