In F#, it”s common to pipeline a chain of commands together, perhaps filtering an input array before mapping with a function:
let xs = [| 1; 2; 3; 4; 5 |] xs |> Array.filter (fun x -> x > 2) |> Array.map (fun x -> x*x)
Marcin Krzyzanowski wrote a neat post showing how Swift uses where
in a number of cases to achieve similar filtering.
The fact is you can use where keyword in a case label of a switch statement, a catch clause of a do statement, or in the case condition of an if, while, guard, for-in statement, or to define type constraints