updated Cakefile
Added a higher order function version