continuify

Converts an array of functions into continuation-passing style