Skip to content

Boolean

Check if a value is a boolean

Given a file named “main.scm” with:

(import (scheme base))
(write-u8 (if (boolean? <value>) 65 66))

When I successfully run scheme main.scm

Then the stdout should contain exactly “<output>”.

Examples

valueoutput
#fA
#tA
’()B

Use a not operator

Given a file named “main.scm” with:

(import (scheme base))
(write-u8 (if (not <value>) 65 66))

When I successfully run scheme main.scm

Then the stdout should contain exactly “<output>”.

Examples

valueoutput
#fA
#tB