3 ms·
My favorite data structure has a list and a map under the hood. Lists are used precisely for the ordering, and you constantly index into the list, but only with
by sulam 10y ago
My favorite data structure has a list and a map under the hood. Lists are used precisely for the ordering, and you constantly index into the list, but only with direct pointers. I dunno how you'd implement it in Haskell, but lists are actually a really good building block -- although you often can replace them with arrays if you're clever enough.