Skip to content

Commit

Permalink
more notes on conts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Williamson committed Apr 19, 2017
1 parent b130c59 commit 20c681d
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 7 deletions.
80 changes: 80 additions & 0 deletions continuations2.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

(picking)
(cherry picking daddies)
(a-friend)

(defin 1st-rec
(lambda (newlat seen)
(a-friend)(cons (cherry) newlat) seen))

(define 2nd-rec
lambda (newlat seen)
1st-rec newlat (cons picking seen))
(define 3rd-rec
lambda(newlat seen)
2nd-rec (cons daddies newlat) seen))

(define final-rec
col() ())

(define 3rd-rec
lambda(newlat seen)
2nd-rec (cons daddies newlat) seen)))(quote())(quote())

(define 3rd-rec
lambda(newlat seen)
2nd-rec (cons daddies (quote()) (quote())))
2nd-rec (daddies)(quote)

define 2nd-rec
lambda (newlat seen)
1st-rec newlat (cons picking seen))(daddies)(quote)
1st-rec daddies picking

(defin 1st-rec
(lambda (newlat seen)
(cons (cherry) newlat) seen))(daddies) (picking)

cons(cherry daddies ) (picking)
#f


(picking)
(cherry derp daddies)
(a-friend)

(defin 1st-rec
(lambda (newlat seen)
(a-friend)(cons (cherry) newlat) seen))

(define 2nd-rec
lambda (newlat seen)
1st-rec (cons (derp) newlat) seen))
(define 3rd-rec
lambda(newlat seen)
2nd-rec (cons daddies newlat) seen))

(define final-rec
col() ())

(define 3rd-rec
lambda(newlat seen)
2nd-rec (cons daddies newlat) seen)))(quote())(quote())

(define 3rd-rec
lambda(newlat seen)
2nd-rec (cons daddies (quote()) (quote())))
;sub
2nd-rec (daddies)(quote)

define 2nd-rec
lambda (newlat seen)
1st-rec (cons derp newlat ) seen )(daddies)(quote)
1st-rec (derp picking)(quote())

(defin 1st-rec
(lambda (newlat seen)
(cons (cherry) newlat) seen))(derp picking)(quote())

(a-friend(cons(cherry derp picking ) (quote())))
#f
21 changes: 14 additions & 7 deletions contiunations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,28 @@ cond eq so sub
()
(lambda (newlat seen)
( (lambda (newlat seen)
(a-friend(cons (quote and) newlat)
(seen)))))) newlat
(cons (quote tuna) seen))))
(a-friend
(cons (quote and) newlat)
(seen))))))
newlat(cons (quote tuna) seen))))

next cond lat = null so above lambda is applied to
(lambda (newlat seen)
( (lambda (newlat seen)
(a-friend(cons (quote and) newlat)
(seen)))))) newlat
(cons (quote tuna) seen))))(quote() quote()))
(seen))))))
newlat(cons (quote tuna) seen))))(quote() quote()))

sub

( (lambda (quote() quote())
(a-friend(quote and)
(quote())))))) (quote())
(cons (quote tuna) (quote()))))
(quote())))))) --function end
(quote())(tuna))


((lambda (quote tuna))
(a-friend(and)
(tuna)))))) --function end


0 comments on commit 20c681d

Please sign in to comment.