Hacker News new | ask | show | jobs
by trealira 721 days ago
I also just learned about it. I found this explanation of what it is: https://drup.github.io/2016/08/02/difflists/

It's a slightly confusing name, though; it makes me think of a difference list, which seems to be a completely unrelated data structure (basically a rope).

http://h2.jaguarpaw.co.uk/posts/demystifying-dlist/

1 comments

Thanks. Yeah, I don't understand the name.

You could construct a basically-equivalent data structure in Haskell, but I think normally you'd use an HList (defined in many places but e.g. https://hackage.haskell.org/package/HList-0.5.2.0/docs/Data-...). I've only occasionally had use for them myself, at any rate I don't think they're convenient for the "apply a function to all these elements" case.