fix foldp: fun is a curried function, but was being called as Fn2