What about coding it as a hook? Though I realize you have to introduce
a new name.
user= (defn myprintln [str]
(println str)
(println tacked on))
#'user/myprintln
user= (let [print-hk myprintln] (print-hk some code))
some code
tacked on
nil
user= (let [print-hk println] (print-hk some code))
Hi,
On Mar 8, 10:23 pm, CuppoJava patrickli_2...@hotmail.com wrote:
And yet, the writer of the library shouldn't have to be aware that the
user *might* bind fast-println to println.
And the user of the library shouldn't have to be aware of the
implementation details of fast-println to want
On Sun, Mar 7, 2010 at 7:57 PM, CuppoJava patrickli_2...@hotmail.com wrote:
Is there an elegant solution to this problem? I'm working around it by
saving the original println in another variable before creating
myprintln, but this isn't very clean.
That's what I generally do, but you could use
On Mar 7, 2010, at 10:57 PM, CuppoJava wrote:
Is there an elegant solution to this problem? I'm working around it by
saving the original println in another variable before creating
myprintln, but this isn't very clean.
In case by another variable, you were referring to another var:
One