Saturday, July 23, 2011

Haskell Notes

I tried to write the Douglas Adams joke but got an error.

*Main> let "The Answer" = 42

:1:20:
    No instance for (Num [Char])
      arising from the literal `42'
    Possible fix: add an instance declaration for (Num [Char])
    In the expression: 42
    In a pattern binding: "The Answer" = 42

No comments:

Post a Comment