return type *is* a function, rather than currying, and i golfed it