Define object of the given type as a stream whose implementation
of stream-next is defined by args and body. This macro adds
a type-specific method for stream-next and derives type
from stream-type.
(defmacro defstream
"Define object of the given type as a stream whose implementation
of stream-next is defined by args and body. This macro adds
a type-specific method for stream-next and derives type
from stream-type."
[type-tag args & body]
`(do
(derive ~type-tag stream-type)
(defmethod stream-next ~type-tag ~args ~@body)))
Comments top
No comments for defstream. Log in to add a comment.