3 ms·
I also just learned about it. I found this explanation of what it is: https://drup.github.io/2016/08/02/difflists/ https://drup.github.io/2016/08/02/difflists/
by trealira 2y ago
I also just learned about it. I found this explanation of what it is: https://drup.github.io/2016/08/02/difflists/ 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/ http://h2.jaguarpaw.co.uk/posts/demystifying-dlist/
- philh 2y agoThanks. 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-HList-HList.html 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.