[Haskell-cafe] Suitable structure to represents lots of similar lists

Alberto G. Corona agocorona at gmail.com
Thu Apr 8 10:13:28 EDT 2010

Id doesn´t have to create a copy of the original object  ( I infer this from
referential transparency) so the new list must store the same original
reference. Any pure structure would conserve references  after id. filter as
far as I know. Am I wrong?

2010/4/8 Dan Piponi <dpiponi at gmail.com>

> I have a situation where I have a bunch of lists and I'll frequently
> be making new lists from the old ones by applying map and filter. The
> map will be applying a function that's effectively the identity on
> most elements of the list, and filter will be using a function that
> usually gives True. This means that there is potential for a large
> amount of sharing between these lists that could be exploited,
> something that ordinary lists would do badly. Does anyone have a
> recommendation for a pure functional data structure for this case?
> (It reminds me a bit of my own antidiagonal type, but that's not well
> adapted to the highly dynamic situation I'm describing.)
> --
> Dan
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100408/67200ed0/attachment.html

More information about the Haskell-Cafe mailing list