Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Task 6 - 2nd set of arguments when k is 3
#11
From the spec, the evaluation of the remaining arguments happens via a call to a variadic function. The number of parameters of a completely variadic function:


Code:
(define (f @)
   (apply g @)
   )


is always 1.

As I said in another post, the next assignment will have you generalize this to unlimited arguments and unlimited partial evaluations.
Reply
#12
echo "(define (f x y z) (+ x (* y z)))" > task6.args
echo "(3)" >> task6.args
echo "(1 2 3)" >> task6.args
echo "()" >> task6.args ...................................1
scam -r task6.scm task6.args


is it possible to solve this without the argument ....... 1
Reply
#13
There should be four items: the function, the length of the first argument list, the first argument list, and the remaining argument list.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)