[<<][staapl][>>][..]
Thu Apr 10 23:19:44 EDT 2008

lifting with shift


 (a (b (C (d (e x)))))

 ab : x -> x
 de : x -> x
 C  : x.y -> x.y

now make
 abCde : x.y -> x.y

let's try again:

add1 : x -> x
swap : (x . x) -> (x . x)

(define (swap x)
  (cons (cdr x) (car x)))

(define (lift fn)
  (shift post                        ;; capture postproc
         (lambda (xy)                ;; create new function
            (let ((xy+ (fn xy)))     ;; apply fn to its input
              (cons (post (car xy+)) ;; apply post to one of the components
                    (cdr xy+))))))   ;; .. and join again

   * capture the stuff that postprocesses the x component
   * apply the



[Reply][About]
[<<][staapl][>>][..]