in 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. print load "test
  2. print fib_out 3
  3. print poall
  4. print erall
  5. print poall
  6. print readlist
  7. a b c 1 2 3
  8. make "fib_out [
  9. [x]
  10. [
  11. print :fib_out
  12. make "fib [
  13. [x]
  14. [if lt :x 2 [1] [add fib sub :x 1 fib sub :x 2]]
  15. ]
  16. fib :x
  17. ]
  18. ]
  19. print fib_out 3
  20. make "f [[x] [
  21. make "g [[y] [return add :x :y]]
  22. return g 42
  23. ]]
  24. print f 233
  25. make "f1 [[x] [
  26. make "g1 [[y] [return add :x :y]]
  27. return :g1
  28. ]]
  29. make "c1 f1 42
  30. make "c2 f1 24
  31. print c1 1
  32. print c2 2
  33. make "curry_two [[f x] [
  34. return [[y] [return f :x :y]]
  35. ]]
  36. make "f2 [[x y] [
  37. return add :x :y
  38. ]]
  39. make "f3 curry_two :f2 42
  40. print f3 233
  41. make "fun [
  42. [x]
  43. [
  44. make "b [
  45. [y]
  46. [return make "x add :x :y]
  47. ]
  48. return :b
  49. ]
  50. ]
  51. make "adder fun 5
  52. print adder 1
  53. print adder 2
  54. print adder 3
  55. print "abcd12
  56. make "a 16
  57. print :a
  58. make "b "a
  59. print thing :b
  60. make "c mul add :a 13 :a
  61. print if false [] [print sub :c "6]
  62. print div 12 5
  63. print mod 12 5
  64. make "d read
  65. 1234dd
  66. make "e print :d
  67. print :e
  68. make "prt [
  69. [a]
  70. [
  71. make "b [
  72. []
  73. [print :a]
  74. ]
  75. return :b
  76. ]
  77. ]
  78. make "c prt "hello
  79. c
  80. make "x 2
  81. print :x
  82. make "test [
  83. []
  84. [
  85. make "x 1
  86. export "x
  87. print :x
  88. ]
  89. ]
  90. test
  91. print :x
  92. print save "test