예제 #1
0
        public void FlatMapToDifferentType()
        {
            var one = EOption <int> .Some(1);

            EOption <string> onePlusOne = one.FlatMap(i => EOption <string> .Some($"{i}+1=2"));

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