boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

027-apply.scm (280B)


      1 ; apply with 2-arg ((apply fn args)) and prefixed-args ((apply fn x... args)) forms.
      2 (define (k a b c) (+ a (- b c)))
      3 (define two-arg (apply k '(10 30 5)))   ; k(10,30,5) = 35
      4 (define prefixed (apply k 10 '(30 5)))  ; same call shape
      5 (sys-exit (+ two-arg prefixed))          ; 70