(getchar)
This procedure returns the next character from the console-input-port. If there’s no character available, (getchar) doesn´t block but immediately returns #f instead. This is a non-standard procedure.
A character or #f.
$ ./scheme
Inlab Scheme 5.1.44
macOS 12.6.3 Darwin 21.6.0 x86_64 2023-04-20 18:27:12
> (getchar)
#f
> (define (x)
(define c (getchar))
(if c (print c))
(x))
x
> (x)
#\h
#\i
#\space