5 ms·There's a whole book of these if you're interested: Purely Functional Data Structures by Chris Okasakiby sayrer 3y agoThere's a whole book of these if you're interested: Purely Functional Data Structures by Chris Okasaki