1 Something other than numbers and characters has been used for a range.
3 Erroneous code example:
6 let string = "salutations !";
8 // The ordering relation for strings cannot be evaluated at compile time,
9 // so this doesn't work:
11 "hello" ..= "world" => {}
15 // This is a more general version, using a guard:
17 s if s >= "hello" && s <= "world" => {}
22 In a match expression, only numbers and characters can be matched against a
23 range. This is because the compiler checks that the range is non-empty at
24 compile-time, and is unable to evaluate arbitrary comparison functions. If you
25 want to capture values of an orderable type between two end-points, you can use