Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
5
Task/Sudan-function/F-Sharp/sudan-function.fs
Normal file
5
Task/Sudan-function/F-Sharp/sudan-function.fs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
let rec sudan = function
|
||||
0L, x, y -> x + y
|
||||
|_, x, 0L -> x
|
||||
|n, x, y -> let x' = sudan (n, x, y-1L) in sudan (n-1L, x', x' + y)
|
||||
printfn "%d\n%d\n%d" (sudan(1L, 13L, 14L)) (sudan(2L, 5L, 1L)) (sudan(2L, 2L, 2L))
|
||||
Loading…
Add table
Add a link
Reference in a new issue