NaN:NaN
NaN:NaN
--:-- / --:--
Newgrounds Background Image Theme

StatikRein just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Haskell String Inputs

566 Views | 1 Reply
New Topic Respond to this Topic

Haskell String Inputs Mar 7, 2009


I'm learning Haskell for my Introduction to Programming and Algorithms course in my University degree. I was wondering if it is possible for when inputting a string, for example, in a small program to find out what you have for classes at a given time and day:

timetable time day

does the day variable have to be put in quotes for a string input/result? Is there any way for

timetable 1100 Friday

to work as opposed to

timetable 1100 "Friday"

which is the way I have things running now?


Aussie Club | TF2 Crew | TJPPC

Steam, Xfire: ParadoxVoid | Gamertag: TheFinalParadox

BBS Signature

Response to Haskell String Inputs Mar 7, 2009


Derive the Read and Show classes.

show :: (Show a) => a -> String read :: (Read a) => String -> a

BBS Signature