Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
13
Task/Man-or-boy-test/Deja-Vu/man-or-boy-test.djv
Normal file
13
Task/Man-or-boy-test/Deja-Vu/man-or-boy-test.djv
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
a k x1 x2 x3 x4 x5:
|
||||
local b:
|
||||
set :k -- k
|
||||
a k @b @x1 @x2 @x3 @x4
|
||||
if <= k 0:
|
||||
+ x4 x5
|
||||
else:
|
||||
b
|
||||
local x i:
|
||||
labda:
|
||||
i
|
||||
|
||||
!. a 10 x 1 x -1 x -1 x 1 x 0
|
||||
8
Task/Man-or-boy-test/Groovy/man-or-boy-test-1.groovy
Normal file
8
Task/Man-or-boy-test/Groovy/man-or-boy-test-1.groovy
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
def a; a = { k, x1, x2, x3, x4, x5 ->
|
||||
def b; b = {
|
||||
a (--k, b, x1, x2, x3, x4)
|
||||
}
|
||||
k <= 0 ? x4() + x5() : b()
|
||||
}
|
||||
|
||||
def x = { n -> { it -> n } }
|
||||
1
Task/Man-or-boy-test/Groovy/man-or-boy-test-2.groovy
Normal file
1
Task/Man-or-boy-test/Groovy/man-or-boy-test-2.groovy
Normal file
|
|
@ -0,0 +1 @@
|
|||
println (a(10, x(1), x(-1), x(-1), x(1), x(0)))
|
||||
3
Task/Man-or-boy-test/Groovy/man-or-boy-test-3.groovy
Normal file
3
Task/Man-or-boy-test/Groovy/man-or-boy-test-3.groovy
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(0..20).each { k ->
|
||||
printf ("%3d: %7d\n", k, a(k, x(1), x(-1), x(-1), x(1), x(0)))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue