Defunctionalize the Continuation Tags: haskell May 15 2020 By Li-yao Xia This post details a little example of refactoring a program using defunctionalization. Defunctionalization Defunctionalization is a programming technique that emulates higher-order functions using only first-order language features. A higher-order function (HOF) can be defunctionalized in two steps: for every location where t