kosta
11-01-2004, 01:32 PM
Hello,
I' a Haskell Newbie and i need some help about a function..
My problem is to update a list of values in Runtime.
For example i have a initial list:
list1="a"
and a function:
add::add::String->[String]
add x = [list1] ++ [x]
I need to do
add "c"
and the "c" most be append to list1
to make list1=["a","c"]
Then if i input
list1
the output must be
["a","c"]
But i can't do it...
Could some one help me ?!
I' a Haskell Newbie and i need some help about a function..
My problem is to update a list of values in Runtime.
For example i have a initial list:
list1="a"
and a function:
add::add::String->[String]
add x = [list1] ++ [x]
I need to do
add "c"
and the "c" most be append to list1
to make list1=["a","c"]
Then if i input
list1
the output must be
["a","c"]
But i can't do it...
Could some one help me ?!