Scriptorium.Nib.Assertion.DU
Functions
Builds a reusable assertion that checks a DU case and extracts its payload as the new subject.
Parameterslabel : string
The case name used in the failure message, e.g. "Circle".
tryExtract : (‘a -> ‘b option)
Returns Some payload when the subject matches the expected case,
None otherwise.
An Assertion<'a,'b> that passes when the case matches and shifts the subject
to the extracted 'b payload.