Re:Is your programming language unreasonable? (2015)
by mbogun on Saturday October 10, 2020 @06:33AM
(#24737981)
Three is a great article about option tyle in the context of F# here: https://fsharpforfunandprofit.com/posts/the-option-type/
For example, a division function could return (1) 'None' for 'div(20, 0)' because division-by-zero is undefined, and return (2) 'Some 10' for 'div(20, 2)' because 20/2 is defined and is equal to '10'.