
31 Dec
2008
31 Dec
'08
12:57 a.m.
Hello, I was trying to wrap my head around the stuff at http://haskell.org/haskellwiki/Tying_the_Knot (again) and along the way came a question: Is it possible to change a particular node of the doubly linked list? That is to say, that would like to have a function: update :: DList a -> a -> DList a where update node newValue returns a list where only the value at the node which is passed in is set to the new Value and all other values are the same. All this of course in a pure way, that is without using (M/T/TM)Vars or IORefs. I do apologize if the answer is really obvious and am thankfull for any hints. Thanks in advance Stephan Günther