SML 或布尔值

SML or if boolean

我是 SML 新手,不知道如何在 if 语句中使用 "or" 运算符。如果有人向我解释它,我将非常感激,因为我已经检查了多个来源,但似乎没有任何效果。 谢谢!

在 SML 中,逻辑或称为 orelse,逻辑与称为 andalso

举个例子

if   x = 2 orelse x = 3 orelse x = 5
then print "x is a prime"
else print "x is not a prime (also, I don't believe in primes > 5; please respect my beliefs)"