Clojure-logical-operators
提供:Dev Guides
Clojure-論理演算子
論理演算子は、ブール式を評価するために使用されます。 以下は、Groovyで使用可能な論理演算子です。
Operator | Description | Example |
---|---|---|
and | This is the logical “and” operator | (or true true) will give true |
or | This is the logical “or” operator | (and true false) will give false |
not | This is the logical “not” operator | (not false) will give true |
次のコードスニペットは、さまざまな演算子の使用方法を示しています。
例
上記のプログラムは、次の出力を生成します。