As already stated, you can use pattern matching to get the desired result. So something like this:
fun foo(NONE) = ""
| foo(SOME a) = a;
But you could save and use Option.valOfthe SML function instead:
Option.valOf(SOME "my string");(Or just valOf(SOME "my string");as pointed out in the comments of newacct).
source
share