change api of `test/2`
add curried forms of major functions that return a function with
signature `fun(json()) -> json()` for use in `fold/2`