4 ms·I mean there's a whole book about this, "Purely Functional Data Structures" (2009) by Chris Okasaki.by throwaway81523 6mo agoI mean there's a whole book about this, "Purely Functional Data Structures" (2009) by Chris Okasaki.