Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Factorial/Order/factorial-1.order
Normal file
9
Task/Factorial/Order/factorial-1.order
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#include <order/interpreter.h>
|
||||
|
||||
#define ORDER_PP_DEF_8fac \
|
||||
ORDER_PP_FN(8fn(8N, \
|
||||
8if(8less_eq(8N, 0), \
|
||||
1, \
|
||||
8mul(8N, 8fac(8dec(8N))))))
|
||||
|
||||
ORDER_PP(8to_lit(8fac(8))) // 40320
|
||||
11
Task/Factorial/Order/factorial-2.order
Normal file
11
Task/Factorial/Order/factorial-2.order
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <order/interpreter.h>
|
||||
|
||||
#define ORDER_PP_DEF_8fac \
|
||||
ORDER_PP_FN(8fn(8N, \
|
||||
8let((8F, 8fn(8I, 8A, 8G, \
|
||||
8if(8greater(8I, 8N), \
|
||||
8A, \
|
||||
8apply(8G, 8seq_to_tuple(8seq(8inc(8I), 8mul(8A, 8I), 8G)))))), \
|
||||
8apply(8F, 8seq_to_tuple(8seq(1, 1, 8F))))))
|
||||
|
||||
ORDER_PP(8to_lit(8fac(8))) // 40320
|
||||
Loading…
Add table
Add a link
Reference in a new issue