RosettaCodeData/Task/Null-object/F-Sharp/null-object.fs

9 lines
161 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
let sl : string list = [null; "abc"]
let f s =
match s with
| null -> "It is null!"
| _ -> "It's non-null: " + s
for s in sl do printfn "%s" (f s)