Lau_of_DK
May 31st, 2008, 07:59 PM
Gents,
I wrote a little library in Lisp, by which you can use every data type as a lazy stream, greatly inspired by the SICP videos. Anyway, it works great and I'm very happy with it. So happy in fact that I want to use it in one of my other projects - but how do I do this?
I tried prefixing my lib with
(defpackage ":COM.BESTINCLASS.STREAMS"
(:use "COMMON-LISP")
(:export :the-empty-strem
:cons-streams
:head
:tail
:empty-stream?
:map-stream
:filter-stream
:append-streams
:enum-interval
:flat-map
:flatten
:accumulate
:nth-stream))
And that compiles like it should. Then afterwards I load up my other project, and start off with
(use-package :com.bestinclass.streams)
or
(in-package :com.bestinclass.streams)
No matter what - I get a "function undefined" when I try to execute them with unqualified names. (I think it was the same with qualified names).
Somebody sharp with packages that can help me out?
/Lau
I wrote a little library in Lisp, by which you can use every data type as a lazy stream, greatly inspired by the SICP videos. Anyway, it works great and I'm very happy with it. So happy in fact that I want to use it in one of my other projects - but how do I do this?
I tried prefixing my lib with
(defpackage ":COM.BESTINCLASS.STREAMS"
(:use "COMMON-LISP")
(:export :the-empty-strem
:cons-streams
:head
:tail
:empty-stream?
:map-stream
:filter-stream
:append-streams
:enum-interval
:flat-map
:flatten
:accumulate
:nth-stream))
And that compiles like it should. Then afterwards I load up my other project, and start off with
(use-package :com.bestinclass.streams)
or
(in-package :com.bestinclass.streams)
No matter what - I get a "function undefined" when I try to execute them with unqualified names. (I think it was the same with qualified names).
Somebody sharp with packages that can help me out?
/Lau