Skip to main content

Any.if_not_nothing

if_not_nothingaction

Group: Logical

Documentation

If self is Nothing then returns Nothing, otherwise returns the result of running the provided action.

Examples

Transform a value only if it is not nothing.

      my_result.if_not_nothing <| my_result + 1