> On Aug 27, 2017, at 7:30 PM, Shu-Hung You
> wrote:
>
> Something along the line of (open-output-file
> "/dev/null") sounds a bit better but I'm not sure how to create a
> discard-everything output port.
`open-output-nowhere`?
https://docs.racket-lang.org/reference/port-lib.html?q=open-outp
Parameterizing current-output-port to (open-output-string) redirects
the output to a string. Something along the line of (open-output-file
"/dev/null") sounds a bit better but I'm not sure how to create a
discard-everything output port.
(define ns (make-base-namespace))
(parameterize ([current-na
Let's say I have a module that looks like
(module a racket
(provide result)
(print "Annoying print line!")
(define result 2))
and I'd like the value of result in another module, so in another module, I
write
(require a)
or
(dynamic-require ''a 'result)
In both cases, I get the value
3 matches
Mail list logo