Queue/Usage: Difference between revisions
Content added Content deleted
(clojure impl) |
|||
Line 174:
<lang clojure>
(defn make-
(atom []))
(defn push-
(swap!
(defn pop-
(if (pos? (count @
(let [x (first @
(swap!
x)))
</lang>
Line 189:
<lang clojure>
(defn make-
(ref []))
(defn push-
(alter
(defn pop-
(if (pos? (count @
(let [x (first @
(alter
x)))
</lang>
The <tt>push-
=={{header|Common Lisp}}==
|