all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
19
Task/Y-combinator/Order/y-combinator.order
Normal file
19
Task/Y-combinator/Order/y-combinator.order
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include <order/interpreter.h>
|
||||
|
||||
#define ORDER_PP_DEF_8y \
|
||||
ORDER_PP_FN(8fn(8F, \
|
||||
8let((8R, 8fn(8G, \
|
||||
8ap(8F, 8fn(8A, 8ap(8ap(8G, 8G), 8A))))), \
|
||||
8ap(8R, 8R))))
|
||||
|
||||
#define ORDER_PP_DEF_8fac \
|
||||
ORDER_PP_FN(8fn(8F, 8X, \
|
||||
8if(8less_eq(8X, 0), 1, 8times(8X, 8ap(8F, 8minus(8X, 1))))))
|
||||
|
||||
#define ORDER_PP_DEF_8fib \
|
||||
ORDER_PP_FN(8fn(8F, 8X, \
|
||||
8if(8less(8X, 2), 8X, 8plus(8ap(8F, 8minus(8X, 1)), \
|
||||
8ap(8F, 8minus(8X, 2))))))
|
||||
|
||||
ORDER_PP(8to_lit(8ap(8y(8fac), 10))) // 3628800
|
||||
ORDER_PP(8ap(8y(8fib), 10)) // 55
|
||||
Loading…
Add table
Add a link
Reference in a new issue