Skip to content

Commit

Permalink
Added definition for call-cc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Duey committed Oct 27, 2013
1 parent 1847cdd commit a97a532
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/clj/monads/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,16 @@
[v]
(cont-monad. v nil nil))

;; holding off on implementing this until later
(defn call-cc
"A computation in the cont monad that calls function f with a single
argument representing the current continuation. The function f should
return a continuation (which becomes the return value of call-cc),
or call the passed-in current continuation to terminate."
[f]
)
(cont-monad. nil
(cont-monad. nil nil nil)
(fn [_]
f)))


(extend-type java.lang.String
Expand Down

0 comments on commit a97a532

Please sign in to comment.