To be specific, you can define such a value as follows:
let undefined<'T> : 'T = failwith "Not implemented yet" let stub1 (x : int) : float = undefined let stub2 (x : 'T) : 'T = undefined
Beware that the F # score is strict. If you bind undefined to a top-level value, it throws an exception during evaluation.
source share