Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Integer-comparison/F-Sharp/integer-comparison.fs
Normal file
8
Task/Integer-comparison/F-Sharp/integer-comparison.fs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
let compare_ints a b =
|
||||
let r =
|
||||
match a with
|
||||
| x when x < b -> -1, printfn "%d is less than %d" x b
|
||||
| x when x = b -> 0, printfn "%d is equal to %d" x b
|
||||
| x when x > b -> 1, printfn "%d is greater than %d" x b
|
||||
| x -> 0, printf "default condition (not reached)"
|
||||
fst r
|
||||
Loading…
Add table
Add a link
Reference in a new issue