Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

delimc

Delimited continuations for Clojure

Subscribe to updates I use delimc


Statistics on delimc

Number of watchers on Github 136
Number of open issues 4
Average time to close an issue 8 months
Main language Clojure
Average time to merge a PR about 9 hours
Open pull requests 3+
Closed pull requests 1+
Last commit over 7 years ago
Repo Created over 8 years ago
Repo Last Updated over 1 year ago
Size 135 KB
Organization / Authorswannodette
Contributors2
Page Updated
Do you use delimc? Leave a review!
View open issues (4)
View delimc activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating delimc for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

delimc

A delimited continuations library for Clojure 1.4.0 (and 1.3.0). Portions based on cl-cont by Slava Akhmechet (http://defmacro.org).

(def cont1 (atom nil))
(def cont2 (atom nil))
(def cont3 (atom nil))
(def cont4 (atom nil))

(reset (+ 1 (apply (fn [a b c]
                     (+ (shift k
                          (reset! cont1 k)
                            (k 1))
                         a b c))
                    3 4 (list 5)))) ;; 14

(@cont1 2) ;; 15

(reset
  (+ 1 (reset (shift k
                (reset! cont2 k)
                (k 2)))
       (reset (shift k
                (reset! cont3 k)
                (k 3))))) ;; 6

(@cont2 4) ;; 8
(@cont3 10) ;; 15

(reset (str "Hello" (shift k
                      (reset! cont4 k)
                        (k ", today is "))
            "a nice day!")) ; "Hello, today is a nice day"

(@cont4 ", yesterday was ") ; "Hello, yesterday was a nice day"

References

delimc open issues Ask a question     (View All Issues)
  • almost 7 years :use requirement
delimc open pull requests (View All Pulls)
  • Nested resets
  • Correct sample output
  • Allow delimc to be used without use/refer
delimc list of languages used
Other projects in Clojure