[Haskell-cafe] Links into list

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Mon May 2 13:42:31 CEST 2011


Re-CCing the list.

On 2 May 2011 11:33, John Sneer <johnsneer at operamail.com> wrote:
> I took a look at
> http://cvs.haskell.org/Hugs/pages/libraries/base/Data-Sequence.html
> but it doesn't seem to be helpful - cannot insert sequence into the
> sequence, just
> modification of a single element is supported. Moreover, indexing via
> Ints would
> require extra recalculation when something is somewhere inserted.
>
> So, either it is not the solution or I have not understood the Sequence
> well. :-(

Well, you can split the list (probably using splitAt) and then insert
another one in between (using ><).

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com



More information about the Haskell-Cafe mailing list