Change foldp example to contain a function which uses both of its arguments