Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Y-combinator/XQuery/y-combinator-1.xquery
Normal file
9
Task/Y-combinator/XQuery/y-combinator-1.xquery
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
let $Y := function($f) {
|
||||
(function($x) { ($x)($x) })( function($g) { $f( (function($a) { $g($g) ($a)}) ) } )
|
||||
}
|
||||
let $fac := $Y(function($f) { function($n) { if($n < 2) then 1 else $n * $f($n - 1) } })
|
||||
let $fib := $Y(function($f) { function($n) { if($n <= 1) then $n else $f($n - 1) + $f($n - 2) } })
|
||||
return (
|
||||
$fac(6),
|
||||
$fib(6)
|
||||
)
|
||||
1
Task/Y-combinator/XQuery/y-combinator-2.xquery
Normal file
1
Task/Y-combinator/XQuery/y-combinator-2.xquery
Normal file
|
|
@ -0,0 +1 @@
|
|||
720 8
|
||||
Loading…
Add table
Add a link
Reference in a new issue