get compiler to give me a cool missing match case error

This commit is contained in:
NunoSempere 2023-10-15 00:45:01 +01:00
parent 4c4d053ab9
commit 4959255947
5 changed files with 2 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -36,12 +36,13 @@ let findIndex xs test =
let rec unwind xs =
match xs with
| [] -> Some([])
| None :: ys -> None
| Some(y) :: ys -> (
match unwind ys with
| Some(zs) -> Some(y :: zs)
| None -> None
)
| None :: ys -> None
(* Basic samplers *)
let sampleZeroToOne () : float = Random.float 1.0