Exemplo n.º 1
0
        public void FlatMapToDifferentType()
        {
            var one = Failable <int, bool> .Success(1);

            Failable <string, bool> onePlusOne = one.FlatMap(i => Failable <string, bool> .Success($"{i}+1=2"));

            Assert.That(onePlusOne.OrThrow(), Is.EqualTo("1+1=2"));
        }