Reputation: 94
Example, I write a Racket script:
; filename: hello.rkt
#lang racket/base
(displayln "hello")
(+ 1 1)
and execute it:
$ racket hello.rkt
output is:
hello
2
I don't want it to print the number '2', how to disable result of the any S-expression value output?
Upvotes: 0
Views: 236
Reputation: 8956
You could use void
to discard values, and begin
to group several expressions together. E.g.
(void (begin (+ 1 1) (+ 2 2) (+ 3 3)))
This prints nothing.
Upvotes: 4