different return order, do [err,val]

also make "curried" version for convenience in checkers