Complete this assignment with Team Two.
Any program that consumes some amount of stack, when converted to CPS and run, suddenly consumes no stack space at all. Why?
CPS the following Racket function. You don’t need to CPS primitives such as empty?, first, rest, cons, cons? and <. You may also assume that the function argument to both of the functions is in CPS. Name the result filter/k as shown below.
; filter: (x -> bool) (listof x) -> (listof x) (define (filter f l) (cond [(empty? l) empty] [else (cond [(f (first l)) (cons (first l) (filter f (rest l)))] [else (filter f (rest l))])])) ; filter/k: (x receiver -> doesn't) (listof x) receiver -> doesn't (define (filter/k f l k) ....)
In 850 words or less, describe if and how your knowledge of continuations and CPS will help you in your future programming practice. Good answers might discuss how this concept can be applied in interesting programming environments or how knowledge of its subtleties clarifies or improves existing practices, techniques, tools, etc.