firewall/utils.ml

8 lines
264 B
OCaml
Raw Normal View History

2022-08-29 07:01:56 +02:00
let rec deoptionalise = function
2022-08-29 22:50:52 +02:00
| Some x :: xs -> x :: deoptionalise xs
2022-08-29 07:01:56 +02:00
| None :: xs -> deoptionalise xs
| [] -> []
2022-09-06 17:19:22 +02:00
let ( &?> ) left right = match left with Error _ -> right | ok -> ok
let ( &> ) left right = match left with Error _ -> right | Ok ok -> ok