Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
19
Task/Man-or-boy-test/F-Sharp/man-or-boy-test-3.fs
Normal file
19
Task/Man-or-boy-test/F-Sharp/man-or-boy-test-3.fs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[<EntryPoint>]
|
||||
let main (args : string[]) =
|
||||
let k = int(args.[0])
|
||||
|
||||
let l x cont = cont x
|
||||
|
||||
let rec a k x1 x2 x3 x4 x5 cont =
|
||||
if k <= 0 then
|
||||
x4 (fun n4 -> x5 (fun n5 -> cont (n4+n5)))
|
||||
else
|
||||
let mutable k = k
|
||||
let rec b cont =
|
||||
k <- k - 1
|
||||
a k b x1 x2 x3 x4 cont
|
||||
b cont
|
||||
|
||||
a k (l 1) (l -1) (l -1) (l 1) (l 0) (printfn "%d")
|
||||
|
||||
0
|
||||
Loading…
Add table
Add a link
Reference in a new issue