On Mon, May 2, 2011 at 8:16 AM, Ivan Lazar Miljenovic
<ivan.miljeno...@gmail.com> wrote:
> On 2 May 2011 11:10, John Sneer <johnsn...@operamail.com> wrote:
>> Hello all,
>>
>>  I have rather strange question. I wonder whether there is an obvious
>> solution or not in Haskell. I tried but without defining quite
>> ugly tree-like structures and incorporating IORefs it seems to me like
>> impossible.
>
> What you want seems more applicable to a Sequence rather than a list.

Or a mutable list, something like

  data MList s a = Nil | Cons (STRef s a) (STRef s (MList s a))

Cheers,

-- 
Felipe.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to