On Mon, Apr 2, 2012 at 5:41 AM, Michael Snoyman <mich...@snoyman.com> wrote:
> On Mon, Apr 2, 2012 at 3:38 PM, Alp Mestanogullari <alpmes...@gmail.com> 
> wrote:
>> Lesson learned: for next year, write a Haskell program that tells if a given
>> -cafe thread or reddit discussion is a April Fool's joke or not.
>
> 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"

My strategy next year will be to not read any email on the 1st.  I'll
just wait until the 2nd to read it all.  Foolproof!

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to