added a way to lift functions returning AsResult