[Haskell-cafe] variable definition according to input

Maria Merit mariam627426 at gmail.com
Sun Sep 5 15:04:52 EDT 2010


Hello,

Is it possible to define variable names according to input data? For
instance:

input = "I k"     => Int k
input = "I m"    => Int m
input = "S s"    => String s

Of course, the real application is much more complicated, but the basic
question is the same.

Many thanks,
Maria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100905/85786e5a/attachment.html


More information about the Haskell-Cafe mailing list