Գրեք սա: Continuation-passing style, defunctionalization, accumulations, and associativity