| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- make "fun [
- [f]
- [
- return [
- [a b]
- [f :a :b]
- ]
- ]
- ]
- make "adder fun [[x y] [add :x :y]]
- print adder 2 3
- make "arr [ [ a b ] c ]
- print :arr[0]
- print :arr[1]
- print :arr[0][0]
- print :arr[0][1]
- make "arr[0][1] "d
- print :arr[0]
- print :arr[0][1]
- make "arr[1] [ add :a :d ]
- print :arr
- print arr 2 3
- make "arr[0][1] [ e [ f ] ]
- print :arr[0][1]
- print :arr[0][1][0]
- print :arr[0][1][1][0]
- print word "hello "world
- print word "hello TRUE
- print word "hello -134.5
- print sentence 483 "dba
- print sentence sentence [ [ a b ] c ] [ d [ e f ] ] [ g ]
- print list 483 "dba
- print list list [ [ a b ] c ] [ d [ e f ] ] [ g ]
- print join [ 483 ] "dba
- print join join [ [ a b ] c ] [ d [ e f ] ] [ g ]
- print first "hello
- print first butlast list list [ [ a b ] c ] [ d [ e f ] ] [ g ]
- make "pow [[a b] [
- if lt :b 1 [
- return 1
- ] [
- make "r pow :a div sub :b mod :b 2 2
- make "r mul :r :r
- if mod :b 2 [
- return mul :r :a
- ] [
- return :r
- ]
- print :r
- ]
- ]]
- print pow 2 18
- print readlist
- a b c 1 2 3
- make "reverse_list [
- [list]
- [if isempty :list [] [join reverse_list butfirst :list first :list]]
- ]
- print reverse_list [a [b c d] [e f] g]
- make "fib_wrap [
- [x]
- [
- make "fib [
- [x]
- [
- if lt :x 2 [return 1] []
- return add fib sub :x 1 fib sub :x 2
- ]
- ]
- fib :x
- ]
- ]
- print fib_wrap 0
- print fib_wrap 1
- print fib_wrap 2
- print fib_wrap 3
- print fib_wrap 4
- print fib_wrap 5
- print fib_wrap 6
- print fib_wrap 7
- print fib_wrap 8
- print fib_wrap 9
- make "f [[x] [
- make "g [[y] [return add :x :y]]
- return g 42
- ]]
- print f 233
- make "f1 [[x] [
- make "g1 [[y] [return add :x :y]]
- return :g1
- ]]
- make "c1 f1 42
- make "c2 f1 24
- print c1 1
- print c2 2
- make "curry_two [[f x] [
- return [[y] [return f :x :y]]
- ]]
- make "f2 [[x y] [
- return add :x :y
- ]]
- make "f3 curry_two :f2 42
- print f3 233
- make "fun [
- [x]
- [[[y] [make "x add :x :y]]]
- ]
- make "adder fun 5
- print adder 1
- print adder 2
- print adder 3
- print "abcd12
- make "a 16
- print :a
- make "b "a
- print thing :b
- make "c mul add :a 13 :a
- print if false [] [print sub :c "6]
- print div 12 5
- print mod 12 5
- make "d read
- 1234dd
- make "e print :d
- print :e
- make "prt [
- [a]
- [
- make "b [
- []
- [print :a]
- ]
- return :b
- ]
- ]
- make "c prt "hello
- c
- make "x 2
- print :x
- make "test [
- []
- [
- make "x 1
- export "x
- print :x
- ]
- ]
- test
- print :x
|