                  5)
     -> ()
 
-  [1] Actually, the first value is always computed due to
-  implementation limitations (or limitations of my creativity, judge
-  for youself).
   "
   [function & args]
   `(generate ((make-generator ~function) ~@args)))

  calls."
  [function]
  `(fn [& args#]
     (let [#^SynchronousQueue queue# (SynchronousQueue.),
	   end# (atom false),
	   eos# (Object.)]
       (letfn [(~(symbol "yield") [x#] (.put queue# x#))]
	 (.start (Thread. (fn []
			    (apply ~function args#)
			    (.put queue# eos#))))
	 (fn []
	   (let [next# (if @end#
			 eos#
			 (let [new# (.take queue#)]
			   (if (= new# eos#)
			     (reset! end# true))
			   new#))]

;; NoSuchElementExceptions when there is nothing left to
;; generate. (See also iterators)

;; Generators

(defmacro- make-generator
