Object
[Object new _clone]
[Object new clone]
(define ConsoleFileStream (import "ConsoleFileStream"))
(define [ConsoleFileStream prompt: aString] (set _prompt [[aString _cString], [aString _cString]]))
(define ConsoleFileStream (import "ConsoleFileStream"))
(define ConsoleFileStream (import "ConsoleFileStream"))
[StdOut prompt: '"abc"]
(define Options (import "Options"))
(define [Options parseOption: aString] (if [aString ='"-abc"] [StdOut nextPutAll: '"def"]))
[Options parseOption: '"-abc"]
(define CokeScanner (import "CokeScanner"))
(define [CokeScanner next] 0)
(define CokeScanner (import "CokeScanner"))
(define bye (lambda () (define [CokeScanner next] 0)))
(bye)
CokeScanner
(bye)
(bye)
(bye)
(define x '10)
_object
../main -emacs boot.k rb-object.k -
r
[r print]
(bye)
GlobalEnvironment
(define c (Compiler withEnvironment: GlobalEnvironment))
(define c [Compiler withEnvironment: GlobalEnvironment])
'('+ '2 '3) compile: c
(define c (Compiler withEnvironment: GlobalEnvironment))
(define c [Compiler withEnvironment: GlobalEnvironment])
['('+ '2 '3) compile: c]
['(+ 2 3) compile: c]
['2 compile: c]
[c environment]
(define c [Compiler withEnvironment: GlobalEnvironment])
[c compile: '2]
[[c compile: '2] print]
[[[c compile: '2] print] _eval]
(define c [Compiler withEnvironment: GlobalEnvironment])
[[c compile: '2] _eval]
(define c [Compiler withEnvironment: GlobalEnvironment])
[[c compile: '2] value]
r
[r print]
[r print]
../main -emacs boot.k rb-object.k -
'3
'3
(load "boot.k")
ls
(load "tmp.k")
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/rb-object.k")
[RMethod evalStaticArgs: '(x '3) in: GlobalEnvironment into: r restIndex: '-1]
r
[r print]
(define x '10)
[RMethod evalStaticArgs: '(x '3) in: GlobalEnvironment into: r restIndex: '-1]
(define r [Array new: '2])
(define r [Array new: '2])
(define r [Array new: '2])
[RMethod evalStaticArgs: '(x '1 '2 '3) in: GlobalEnvironment into: r restIndex: '1]
[r print]
(define [RMethod evalStaticArgs: static-call-site-args in: anEnv into: actualArgValues restIndex: restIndex]
  (let ((compiler [Compiler withEnvironment: anEnv])
(idx '0)
(dstIdx '0)
(size [static-call-site-args size])
(val 0)
(restArgs (if (or [restIndex < '0] [size <= restIndex]) 0 [Array new: [size - restIndex]])))
    (while [idx < size]
   (set val [[compiler compile: [static-call-site-args at: idx]] value])
   (if (or [restIndex < '0] [idx < restIndex])
       (begin 
 [actualArgValues at: idx put: val]
 (set idx [idx + '1]))
       (begin
 [restArgs at: dstIdx put: val]
 (set idx [idx + '1])
 (set dstIdx [dstIdx + '1]))))
    (if [restIndex >= 0]
[actualArgValues at: restIndex put: restArgs])))
[RMethod evalStaticArgs: '(x '1 '2 '3) in: GlobalEnvironment into: r restIndex: '1]
[RMethod evalStaticArgs: '(x '1 '2 '3) in: GlobalEnvironment into: r restIndex: '1]
[r print]
[RMethod evalStaticArgs: '(x 'x '1 '2 '3) in: GlobalEnvironment into: r restIndex: '1]
[r print]
[RMethod evalStaticArgs: '(x) in: GlobalEnvironment into: r restIndex: '1]
[r print]
(max '1 '2)
(syntax max ; (max ...)
   (lambda (node compiler)
     `(lambda ()
(let ((s [node size])
      (idx '1)
      (let ((m ,[node at: idx]))))
  (while [,idx < ,s]
 (let ((c ,[node at: idx]))
   (if [c > m]
       (set m c)))
 (set idx [idex + '1]))))))
(syntax max ; (max ...)
   (lambda (node compiler)
     `(lambda ()
(let ((s [node size])
      (idx '1)
      (let ((m ,[node at: idx]))))
  (while [,idx < ,s]
 (let ((c ,[node at: idx]))
   (if [c > m]
       (set m c)))
 (set idx [idex + '1]))))))
(syntax max ; (max ...)
   (lambda (node compiler)
     `(lambda ()
(let ((s [node size])
      (idx '1)
      (let ((m ,[node at: idx]))))
  (while [,idx < ,s]
 (let ((c ,[node at: idx]))
   (if [c > m]
       (set m c)))
 (set idx [idx + '1]))))))
(syntax max ; (max ...)
   (lambda (node compiler)
     `(lambda ()
(let ((s [node size])
      (idx '1)
      (let ((m ,[node at: idx]))))
  (while [,idx < ,s]
 (if [c > m]
     (set m c)))
 (set idx [idx + '1])))))
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(syntax max ; (max ...)
   (lambda (node compiler)
     `(lambda ()
(let ((s [node size])
      (idx '1)
      (let ((m ,[node at: idx]))))
  (while [idx < s]
 (if [c > m]
     (set m c)))
 (set idx [idx + '1])))))
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(max '1 '2)
(max 1 3 5)
(max1 '1 '2)
(syntax && (lambda (node compiler) `(and ,@[node copyFrom: '1])))
(&& '1 '0)
pwd
(max1 '1 '2 '4)
(max1 '(1 2 4))
(max1 '('1 '2 '4))
(max1 '(1 2 4))
(define max1
  (lambda (ary)
    (let ((s [ary size])
  (idx '0)
  (m [ary at: idx]))
      (set idx [idx + '1])
      (while [idx < s]
     (let ((c [ary at: idx]))
       (if [c > m]
   (set m c)))
     (set idx [idx + '1]))
      m)))
(max1 '(1 2 3))
(define x '4)
(max1 '(1 2 x 3))
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(max1 [Array with: '1 '2 x '3])
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(max '1 '2 x '3)
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(max '1 '2 '3 '3)
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(max '1 '2 '3 '3)
(max '1 '2 '3 '3)
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/max.k")
(max 1 3 5 7)
(syntax max ; (max ...)
  (lambda (node compiler)
    `(let ((s [',[node size] - '1])
   (args ',[node copyFrom: '1])
   (idx '0)
   (m [args at: idx]))
       (set idx [idx + '1])
       (while [idx < s]
 (let ((c [args at: idx]))
   (if [c > m]
       (set m c)))
 (set idx [idx + '1]))
       m)))
(max 1 3 5 7)
(max 1)
(max 2)
(syntax max ; (max ...)
  (lambda (node compiler)
    `(let ((s [',[node size] - '1])
   (args ',[node copyFrom: '1])
   (idx '0)
   (m [[args at: idx] eval]))
       (set idx [idx + '1])
       (while [idx < s]
 (let ((c [[args at: idx] eval]))
   (if [c > m]
       (set m c)))
 (set idx [idx + '1]))
       m)))
(max 1 3 5 7)
(max 1 '3 5 7)
(max 1 '3 '5 7)
(max 1 '3 '5 7)
(max 1 '3 4 7)
(max 1 '3 '4 7)
(syntax max ; (max ...)
  (lambda (node compiler)
    `(let ((s [',[node size] - '1])
   (args ',[node copyFrom: '1])
   (idx '0)
   (m [[compiler compile: [args at: idx]] value]))
       (set idx [idx + '1])
       (while [idx < s]
 (let ((c [[compiler compile: [args at: idx]] value]))
   (if [c > m]
       (set m c)))
 (set idx [idx + '1]))
       m)))
(max 1 '3 '4 7)
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/max.k")
(max x '3 5 9)
[[Compiler new] compile: '(1)]
[[Compiler new] compile: '1]
[[Compiler new] compile: '1] print]
[[[Compiler new] compile: '1] print]
[[[Compiler new] compile: '1] value]
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(max '1 '3 '-1)
(max '1 5 '-1)
(define x '3)
(max '1 5 '-1 x)
((lambda (y) (max '1 '3 y '5)) '4)
(max '1 5 '-1 x)
(syntax max ; (max ...)
  (lambda (node compiler)
    `(let ((s [',[node size] - '1])
   (args ',[node copyFrom: '1])
   (idx '0)
   (m [args at: idx]))
       (set idx [idx + '1])
       [args print]
       [s print] [StdOut cr]
       [idx print] [StdOut cr]
       (while [idx < s]
      [[args at: idx] print]
      (let ((c [args at: idx]))
(if [c > m]
    (set m c)))
      (set idx [idx + '1])) m)))
(max 1 2 3 4 5)
(syntax max ; (max ...)
  (lambda (node compiler)
    `(let ((s [',[node size] - '1])
   (args ',[node copyFrom: '1])
   (tmp [args print])
   (idx '0)
   (m [args at: idx]))
       (set idx [idx + '1])
       [args print]
       [s print] [StdOut cr]
       [idx print] [StdOut cr]
       (while [idx < s]
      [[args at: idx] print]
      (let ((c [args at: idx]))
(if [c > m]
    (set m c)))
      (set idx [idx + '1])) m)))
(max 1 2 3 4 5)
(syntax max ; (max ...)
  (lambda (node compiler)
    `(let ((s [',[node size] - '1])
   (args ',[node copyFrom: '1])
   (idx '0)
   (m [args at: idx]))
       (set idx [idx + '1])
       [args print]
       (while [idx < s]
      [[args at: idx] print]
      (let ((c [args at: idx]))
(if [c > m]
    (set m c)))
      (set idx [idx + '1])) m)))
(max 1 2 3 4 5)
[3 print]
(syntax max ; (max ...)
  (lambda (node compiler)
    `(let ((s [',[node size] - '1])
   (args ',[node copyFrom: '1])
   (idx '0)
   (m [args at: idx]))
       (set idx [idx + '1])
       (while [idx < s]
      (let ((c [args at: idx]))
(if [c > m]
    (set m c)))
      (set idx [idx + '1])) m)))
[3 print]
(max 1 2 3 4 5)
(max -11 2 4 5)
(syntax max ; (max ...)
  (lambda (node compiler)
    `(let ((s [',[node size] - '1])
   (args ',[node copyFrom: '1])
   (idx '0)
   (m [args at: idx]))
       (set idx [idx + '1])
       (while [idx < s]
      (let ((c [args at: idx]))
(if [c > m]
    (set m c)))
      (set idx [idx + '1])) m)))
(define x 11)
(max -11 2 4 x)
      ['(let ((: 0 : 1))
  (while (!= : 0 : 3)
    : 4
    (set : 0 (+ : 0 : 2))))
       withParameters:
         ['() with: [spec first]
      with: [spec second]
      with: [spec third]
      with: [spec fourth]
      with: node]])))
['(let ((: 0 : 1))
  (while (!= : 0 : 3)
    : 4
    (set : 0 (+ : 0 : 2))))
       withParameters:
         ['() with: '10
      with: '20
      with: '30
      with: '40
      with: '50]]
[['(let ((: 0 : 1))
  (while (!= : 0 : 3)
    : 4
    (set : 0 (+ : 0 : 2))))
       withParameters:
         ['() with: '10
      with: '20
      with: '30
      with: '40
      with: '50]] print]
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(max '1 '2 '3)
(max '1 '2 '3 '4 11)
(define x '5)
(max '1 '2 '3 '4 x)
((lambda (y) [y + '1]) '3)
((lambda (y) (max '1 '2 '3 '4 y)) '5)
(load "c:/cygwin/home/idst-5.7/examples/jolt/ruby/tmp.k")
(define max1
  (lambda (ary compiler)
    [[compiler outer] print] [StdOut cr]
    (let ((s [ary size])
  (idx '0)
  (m [[ary at: idx] evalWith: compiler]))
      (set idx [idx + '1])
      (while [idx < s]
     (let ((c [[ary at: idx] evalWith: compiler]))
       (if [m < c]
   (set m c)))
     (set idx [idx + '1]))
      m)))
(max '1 '2)
((lambda (y) (max '1 '2 '3 '4 y)) '5)
(max '1 '2 '3)
(define x 1)
(define f (set x (+ x 2)))
(define f (lambda () (set x (+ x 2))))
(max '1 '2 (f) (f))
(max '1 '2 (f) (f))
(make-max '(1 2 3))
[(make-max '(1 2 3)) print]
(max '2 '1)
(define make-max
  (lambda (exprs)
    (let ((idx  '0)
          (lim  [exprs size])
          (body [WriteStream on: [Expression new: '8]]))
      (while (< idx lim)
[body nextPut: `(if (< val (set tmp ,[exprs at: idx])) (set val tmp))]
        (set idx (+ idx 2)))
      [body contents])))
(define make-max
  (lambda (exprs)
    (let ((idx  '0)
          (lim  [exprs size])
          (body [WriteStream on: [Expression new: '8]]))
      (while (< idx lim)
[body nextPut: `(if (< val (set tmp ,[exprs at: idx])) (set val tmp))]
        (set idx (+ idx 2)))
      [body contents])))
(define make-max
  (lambda (exprs)
    (let ((idx  '0)
          (lim  [exprs size])
          (body [WriteStream on: [Expression new: '8]]))
      (while (< idx lim)
[body nextPut: `(if (< val (set tmp ,[exprs at: idx])) (set val tmp))]
        (set idx (+ idx 2)))
      [body contents])))
(define make-max
  (lambda (exprs)
    (let ((idx  '0)
          (lim  [exprs size])
          (body [WriteStream on: [Expression new: '8]]))
      (while (< idx lim)
[body nextPut: `(if (< val (set tmp ,[exprs at: idx])) (set val tmp))]
        (set idx (+ idx 2)))
      [body contents])))
(define make-max
  (lambda (exprs)
    (let ((idx  '0)
          (lim  [exprs size])
          (body [WriteStream on: [Expression new: '8]]))
      (while (< idx lim)
[body nextPut: `(if (< val (set tmp ,[exprs at: idx])) (set val tmp))]
        (set idx (+ idx 2)))
      [body contents])))
(make-max '(1 2 3))
(max '1 '2)
(max '1 '2 '3 '3 '3 '3 '3 '3 '3 '3 '3 '3 )
(define make-max
  (lambda (exprs)
    (let ((idx  '0)
          (lim  [exprs size])
          (body [WriteStream on: [Expression new: [lim]]]))
(max '1 '2 '3 '3 '3 '3 '3 '3 '3 '3 '3 '3 )
(max '1 '2 '3 '3 '3 '3 '3 '3 '3 '3 '3 '3 )
(define make-max
  (lambda (exprs)
    (let ((idx  '0)
          (lim  [exprs size])
          (body [WriteStream on: [Expression new: lim]]))
      (while (< idx lim)
[body nextPut: `(if (< val (set tmp ,[exprs at: idx])) [tmp print] (set val tmp))]
        (set idx (+ idx 2)))
      [body contents])))
(max '1 '2 '3 '3 '3 '3 '3 '3 '3 '3 '3 '3 )
(max '1 '2 '3 '3 '3 '3 '3 '3 '3 '3 '3 '3 )
(define make-max
  (lambda (exprs)
    (let ((idx  '0)
          (lim  [exprs size])
          (body [WriteStream on: [Expression new: lim]]))
      (while (< idx lim)
[body nextPut: `(if (< val (set tmp ,[exprs at: idx])) [tmp print] [StdOut space] (set val tmp))]
        (set idx (+ idx 2)))
      [body contents])))
(max '1 '2 '3 '3 '3 '3 '3 '3 '3 '3 '3 '3 )
(max '1 '2 '3 '3 '3 '3 '3 '3 '3 '3 '3 '3 )
(define x 11)
(max '1 '2 'x)
(max '2 3 'x)
(max '2 3)
(+ 1 3)
[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1]
[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1]
[[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1] print]
r
[r print]
[r print]
r
[[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1] print]
[r print]
r
(define [RMethod stuffArgs: arg-values into: actualArgValues restIndex: restIndex]
  (let ((idx '0)
(dstIdx '0)
(size [arg-values size])
(val 0)
(restArgs (if [restIndex < '0] 0 [Array new: (if [[size - restIndex] >= '0] [size - restIndex] '0)])))
    (while [idx < size]
   (set val [arg-values at: idx])
   (if (or [restIndex < '0] [idx < restIndex])
       (begin
 [val print] [StdOut space]
 [actualArgValues at: idx put: val]
 (set idx [idx + '1]))
       (begin
 [restArgs at: dstIdx put: val]
 (set idx [idx + '1])
 (set dstIdx [dstIdx + '1]))))
    (if [restIndex >= '0]
[actualArgValues at: restIndex put: restArgs])))
[[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1] print]
[r print]
[[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1] print]
(define [RMethod stuffArgs: arg-values into: actualArgValues restIndex: restIndex]
  (let ((idx '0)
(dstIdx '0)
(size [arg-values size])
(val 0)
(restArgs (if [restIndex < '0] 0 [Array new: (if [[size - restIndex] >= '0] [size - restIndex] '0)])))
    (while [idx < size]
   (set val [arg-values at: idx])
   [val print] [StdOut space]
   (if (or [restIndex < '0] [idx < restIndex])
       (begin
 [actualArgValues at: idx put: val]
 (set idx [idx + '1]))
       (begin
 [restArgs at: dstIdx put: val]
 (set idx [idx + '1])
 (set dstIdx [dstIdx + '1]))))
    (if [restIndex >= '0]
[actualArgValues at: restIndex put: restArgs])))
[[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1] print]
(define [RMethod stuffArgs: arg-values into: actualArgValues restIndex: restIndex]
  (let ((idx '0)
(dstIdx '0)
(size [arg-values size])
(val 0)
(restArgs (if [restIndex < '0] 0 [Array new: (if [[size - restIndex] >= '0] [size - restIndex] '0)])))
    (while [idx < size]
   (set val [arg-values at: idx])
   [val print] [StdOut space]
   (if (or [restIndex < '0] [idx <= restIndex])
       (begin
 [actualArgValues at: idx put: val]
 (set idx [idx + '1]))
       (begin
 [restArgs at: dstIdx put: val]
 (set idx [idx + '1])
 (set dstIdx [dstIdx + '1]))))
    (if [restIndex >= '0]
[actualArgValues at: restIndex put: restArgs])))
[[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1] print]
[r print]
[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1]
[r print]
[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1]
(define [RMethod stuffArgs: arg-values into: actualArgValues restIndex: restIndex]
  (let ((idx '0)
(dstIdx '0)
(size [arg-values size])
(val 0)
(restArgs (if [restIndex < '0] 0 [Array new: (if [[size - restIndex] >= '0] [size - restIndex] '0)])))
    [restArgs print]
    (while [idx < size]
   (set val [arg-values at: idx])
   (if (or [restIndex < '0] [idx < restIndex])
       (begin
 [actualArgValues at: idx put: val]
 (set idx [idx + '1]))
       (begin
 [restArgs at: dstIdx put: val]
 (set idx [idx + '1])
 (set dstIdx [dstIdx + '1]))))
    (if [restIndex >= '0]
[actualArgValues at: restIndex put: restArgs])))
[RMethod stuffArgs: '(1 2 3) into: r restIndex: 1]
[RMethod stuffArgs: '(1 2 3) into: r restIndex: '1]
r
[r print]
(define x '10)
[RMethod stuffArgs: ((lambda (y) [Array with: x with: y with: '3]) '5) into: r restIndex: 1]
[r print]
(define [RMethod stuffArgs: arg-values into: actualArgValues restIndex: restIndex]
  (let ((idx '0)
(dstIdx '0)
(size [arg-values size])
(val 0)
(restArgs (if [restIndex < '0] 0 [Array new: (if [[size - restIndex] >= '0] [size - restIndex] '0)])))
    (while [idx < size]
   (set val [arg-values at: idx])
   (if (or [restIndex < '0] [idx < restIndex])
       (begin
 [actualArgValues at: idx put: val]
 (set idx [idx + '1]))
       (begin
 [restArgs at: dstIdx put: val]
 (set idx [idx + '1])
 (set dstIdx [dstIdx + '1]))))
    (if [restIndex >= '0]
[actualArgValues at: restIndex put: restArgs]
[actualArgValues at: restIndex put: 0])))
[RMethod stuffArgs: ((lambda (y) [Array with: x with: y with: '3]) '5) into: r restIndex: '1]
[r print]
[RMethod stuffArgs: ((lambda (y) [Array with: x with: y with: '3]) '5) into: r restIndex: '1]
r
[r print]
(define r [Array new: '4])
[RMethod stuffArgs: ((lambda (y) [Array with: x with: y with: '3 with: '1]) '5) into: r restIndex: 0]
(load "for.k")
(load "mylib.k")
(define OS (import "OS"))
(define Object (import "Object"))
(define Compiler (import "Compiler"))
'Object
d
Compiler
[Compiler parseOption: '"-vs"]
(max '1 '2)
(max '1 '2 '3 '4)
[Compiler parseOption: '"-vs"]
(max '1 '2 '3 '4)
d
[Compiler parseOption: '"-vs"]
../main -emacs boot.k k.k -
[Compiler parseOption: '"-vs"]
(max '1 '2 '3 '4)
(and 1 1 2 2 3)
(max '1 '2 '3)
[Compile: form: '(+ 1 3))
[Compile: form: '(+ 1 3)]
[Compiler form: '(+ 1 3)]
[Compiler form: '(#+ 1 3)]
[Compiler compile: '(#+ 1 3)]
[[Compiler compile: '(+ 1 3)] print]
[[Compiler compile: '(+ 1 3)] _eval]
[[Compiler compile: '(+ 1 3)] value]
[[Compiler compile: '(lambda (x) (+ x 3))] print]
[[Compiler compile: '(lambda (x) (+ x 3))] _labelAddress]
([[Compiler compile: '(lambda (x) (+ x 3))] _labelAddress] 3)
([[Compiler compile: '(lambda (x) (+ x 3))] _labelAddress] 2)
[([[Compiler compile: '(lambda (x) (+ x 3))] _labelAddress] 2) print]
[[Compiler compile: '(lambda (x) (+ x 3))] value]
([[Compiler compile: '(lambda (x) (+ x 3))] value] 3)
[[Compiler compile: '(lambda (x) (+ x 3))] print]
([[Compiler compile: '(lambda (x) (+ x 3))] value] 5)
b
d
l
d
d
(define f (lambda () '3))
[(apply f ) print]
(apply f )
(define f (lambda (x) (+ x '3)))
(apply f '2)
(let ((idx '0)(while (
d
d
x
)
)
)
)
(define f (lambda (x y z) [[[x + y] + z] + '1]))
(f '1 '2 '3)
(define f (lambda (x y z) [[[[x + y] + z] + '1] print]))
(let     ((idx '0)      (size '10000000))   (if [idx < size]       0     (set idx (+ idx 2))     (apply f idx [idx - '1] [idx - '2])))
(define f (lambda (x y z) [[[[x + y] + z] + '1] print]))
(let     ((idx '0)      (size '10000000))   (if [idx < size] 0       (begin        (set idx (+ idx 2))     (apply f idx [idx - '1] [idx - '2])))) 
(let ((idx '0) (size '10000000))   (if [idx < size] 0 (begin (set idx (+ idx 2)) (apply f idx [idx - '1] [idx - '2])))) 
(let ((idx '0) (size '10000000))   (if [idx >= size] 0 (begin (set idx (+ idx 2)) (apply f idx [idx - '1] [idx - '2])))) 
(let ((idx '0) (size '10000000))   (if [idx >= size] 0 (begin (set idx (+ idx 2)) [(apply f idx [idx - '1] [idx - '2] print]))))
(define f (lambda (x y z) [[[x + y] + z] + '1]))
(let  ((idx '0)      (size '10000000))   (while [idx < size]     (apply f idx [idx - '1] [idx - '2])     (set idx (+ idx 2))))
(define a '(x y z))
(define f (lambda a (+ x y z)))
(* 12 75)
d
d
(define f (lambda (x y z) [[x + y] + z] x))
(apply f '(1 2 3))
(define f (lambda (x y z) [[x + y] + z] x))
(define x [Array with: '1 with: 2])
(define x [Array with: '1 with: '2 with: '3])
(apply f x)
(define x [Array with: '1 with: '2 with: '3])
x
[x print]
[x eval]
(define x [Array with: '1 with: '2 with: '3])
d
(apply f y '1 '3)
'(1 y 3)
['(1 y 3) print]
d
(applyList f '(1 y '3))
../main boot.k apply.k -
(applyList f '(1 3 5))
(applyList f '(3 1 5))
d
(applyList f '(3 1 5))
(applyList f '('3 '2 '1))
(let  ((idx '0)      (size '10000000))   (while [idx < size]     (applyList f [Expression with: idx with: [idx - '1] with: [idx - '2]])     (set idx (+ idx 2))))
f
(let  ((idx '0)      (size '10000000))   (while [idx < size]     (applyList f [Expression with: idx with: [idx - '1] with: [idx - '2]])     (set idx (+ idx 2))))
d
(applyList f '('3 y 1))
(let ((n '3)) (applyList f '(1 n 3)))
(let ((n '3)) (applyList f '(n 1 3)))
(let
  ((idx '0)
   (size '10000000))
  (while [idx < size]
    (applyList f '(idx [idx - '1] [idx - '2]))
    (set idx (+ idx 2))))
f
'(f 1 2)
['(f 1 2) first]
f
[['(f 1 2) first] print]
d
(applyList f '(y 1 '3))
['(y 1 '3) print]
['(y 1 '3) first]
[['(y 1 '3) first] print
]
d
d
(applyList f '(1 3 5))
y
(applyList f '(y 1 '3))
[(applyList f '(y 1 '3)) print]
(applyList f '(1 3 5))
[['(1 3 5) first] print]
['(1 3 5) first]
['(1 3 5) second]
['(1 3 5) print]
[['(1 3 5) second] print]
[(Expression with: 1 with: 3 with: 5) print]
[Expression with: 1 with: 3 with: 5]
[[Expression with: 1 with: 3 with: 5] first]
['( 1 3 5) first]
['(x 3 5) first]
f
y
(applyList f '(1 2 3))
(applyList f '(x 2 3))
[(applyList f '(x 2 3)) print]
d
d
(apply f '(1 2 3))
(define f (lambda (x y z) (+ x y z) x))
(apply f '(1 2 3))
(define f (lambda (x y z) (+ x y z)))
(apply f '(1 2 3))
(apply f (Array with: 1 with: 3 with: 5))
(lambda () ([Array with: 1 with: 3 with: 5]))
[(lambda () ([Array with: 1 with: 3 with: 5])) prnt]
[(lambda () ([Array with: 1 with: 3 with: 5])) print]
[(lambda () ([Array with: '1 with: '3 with: '5])) print]
[((lambda () [Array with: '1 with: '3 with: '5])) print]
(apply f ((lambda () [Array with: 1 with: 3 with: 5])))
(define f (lambda (x y z) x))
(apply f '(y 1 '3))
(define f (lambda (x y z) (+ x y z)))
(let
  ((idx '0)
   (size '10000000))
  (while [idx < size]
    (apply f '(idx [idx - '1] [idx - '2]))
    (set idx (+ idx 2))))
(define Date (import "Date"))
(load "apply.k")
start
end
(load "apply.k")
end
start
[Date microseconds]
[Date microseconds]
[Date microseconds]
[Date new microseconds]
start
end
[[end - start] // 1000]
[[end - start] print]
d
start
end
[[end - start] print]
d
start
end
[[end - start] print]
d
[[end - start] print]
d
d
[[end - start] print]
d
d
d
(let ((idx '0)) [Expression with: idx])
[(let ((idx '0)) [Expression with: idx]) print]
[(let ((idx '0)) (apply (lambda (x) x) [Expression with: idx])) print]
d
[[end - start] print]
d
d
[end - start]
[[end - start] print]
d
d
d
d
d
d
d
d
(+ 5 (apply1))
d
(+ 5 (apply1))
d
(+ 5 (apply1))
(+ 5 (apply1))
d
(+ 5 (apply1))
(apply1)
[(apply1) print]
(define x '(1 2 3))
`(,@x)
[`(,@x) print]
d
(apply1 1 2 3)
[(apply1 1 2 3) print]
apply1
[(apply1 1 2 3) print]
[(apply1 1 2 3) print]
[(apply1 1 2 3) print]
(apply1 1 2 3)
(apply1 1 2 3)
(apply1 1 2)
[(apply1  2 3) print]
d
(apply1 1 2)
[(apply1 1 2) print]
(apply1 1 2)
(define x (apply1 1 2))
x
x
[x print]
(lambda (x) (apply1 1 2))
(define f (lambda (x) (apply1 1 2)))
(f 1)
[(f 1) print]
[(f 1) print]
d
(define f (lambda (x) (apply1 '3)))
f
(f 3)
[(f 3) print]
[(f 2) print]
(define f (lambda (x) (apply1 x)))
[(f '1) print]
[(f '3) print]
d
(apply1 '10)
[(apply1 '10) print]
(define f (lambda (x) (apply1 x)))
[(f '5) print]
[(f '3) print]
d
