Hi,

I'm a poor lonesome newbie in Haskell world, and I would like to add a string
typed on the prompt to a list of strings which is already defined.

It would look like something like :

type Path = [String]

currentPath::Path
currentPath = []

getpiece ::IO String
getpiece  =  do c <-getLine
                return c

putpiece:: String->Path
putpiece a = a:currentPath

and then I could combine the two functions, but obviously it doesn't work.
I dare understand that it's impossible isn't it ?

Maybe the only way is to create a new [String] each time I want to add a new 
string ? No ?

Christophe Certain
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to