Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell Help

Name: Anonymous 2008-10-25 19:41

Haskell beginner here. Anybody know how i shrink this down a bit, sorry I'd figure out myself but i'm sick of learning the same concepts in 20 different languages.

{-

type Month = String

validMonth :: Month -> Bool
validMonth "January" = True
validMonth "February" = True
validMonth "March" = True
validMonth "April" = True
validMonth "May" = True
validMonth "June" = True
validMonth "July" = True
validMonth "August" = True
validMonth "September" = True
validMonth "October" = True
validMonth "November" = True
validMonth "December" = True
validMonth _ = False

-}

Name: Anonymous 2008-10-26 0:19

>>10
No it wasn't.  How the fuck are you supposed to validate a string when you don't know what would be an acceptable value?  And OP never even mentioned a fucking array.  And "inputted integer"?  What the fuck are you talking about?  Who's going to input a fucking integer?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List