Title: Data structures and amortized complexity in a functional setting