Bottom/undefined value in F#?

f#

Solution

To be concrete, you can define such a value like this:

let undefined<'T> : 'T = failwith "Not implemented yet"

let stub1 (x : int) : float = undefined
let stub2 (x : 'T) : 'T = undefined

Beware that F# evaluation is strict. If you bind `undefined` to a top-level value, it will throw an exception during evaluation.

Problem

There is a convenient undefined value in Haskell that can be used as a stub for yet to be defined functions/paths in code. Is there anything like it in F#?

Original source