Hello zaxis,
Thursday, October 22, 2009, 1:03:21 PM, you wrote:
> Is [(1,1),(2,2),(3,3)] been regarded as a hash ? If not, what is the best
> way to change it to [(1,1),(2,),(3,3)] in function `f` ?
f = map (\x@(a,b) -> if a==2 then (a,) else x)
or
f xs = [(a, if a==2 then else b)
Hello zaxis,
Thursday, October 22, 2009, 1:03:21 PM, you wrote:
>>>value <- readIORef aaa
>>>writeIORef aaa (f value)
> then aaa will *point to* a new value. The original value will be Garbage
> Collected, right ?
yes, exactly
> BTW,
> Is [(1,1),(2,2),(3,3)] been regarded as a hash ? If not,