const addOne = num => Right(R.add(1)); const error = () => Left(new Error('error')) Right(10) .chain(addOne) .map(R.add(2)) .inspect() // Right(13) Right(10) .chain(error) .map(R.add(2)) .inspect() // Left(Error: error)