initial commit
reverse the arguments, so that the path is first
make it curryable and make it behave well for bad input