jeudi 22 octobre 2020

Multiple if statements in mit-scheme

I'm trying to create multiple nested if statements in mit-scheme with a similar structure as:

(if (null? (x))
L
    (if (< (x) (y))
        .. do stuff .. )
    (if (< (y) (z))
        .. do stuff .. )
)

However, when I compile it, it gives me:

Ill-formed special form: (if (null? ...) l (if ... ... ...) (if ... ... ...))

Does anyone know what's causing this? I'm essentially trying to go: if this condition is true, check if these two conditions are also true and perform an action accordingly.

I'm compiling with:

mit-scheme --quiet --load program.scm

Aucun commentaire:

Enregistrer un commentaire