How to use switch on the value with an Option?

75 Views Asked by At

I am using LanguageExt but I suspect the same question applies to other FP languages. I got myself in the situation below and would love to have some advice:

  • Check the value in an Option
  • Depending on the value, a different function is applied
  • The problem is that the functions return different types

How do I make this work? I am having a hard time getting the value out of the monad and apply the functions.

0

There are 0 best solutions below