concept true in category clojure

appears as: true
Clojure: The Essential Reference

This is an excerpt from Manning's book Clojure: The Essential Reference.

  • "<metamap>" is an optional map of key-value pairs (for example ^{:a true}). "<metamap>" also accepts a concise syntax using just the keys ^:tagname1 ^:tagname2 where the value is implicitly true. Please note that the alternate syntax is only available in some of the location where "<metamap>" is allowed. Tags are stored along with the var created by the function definition. Also depending on position, <metamap> might require the ^ prefix to appear just before the opening curly brace.
  • if-let returns the evaluation of "then-form" if "expr" is logical true, the evaluation of "else-form" if "expr" is logical false. It returns nil if "expr" is logical false and no "else-form" expression is present.
  • Get Programming with Clojure

    This is an excerpt from Manning's book Get Programming with Clojure.

    The syntax for equality check is exactly the same as the syntax for arithmetic operations that we introduced in the previous lesson. The difference is that an expression like (= 2 3) returns true or false, while an expression like (+ 2 3) returns a number.

    In this lesson, we will introduce the two boolean values: true and false, and get a first introductory meeting with the Clojure null value: nil.

    The Joy of Clojure, Second Edition

    This is an excerpt from Manning's book The Joy of Clojure, Second Edition.

    Every value looks like true to if, except for false and nil. That means values some languages treat as false—zero-length strings, empty lists, the number zero, and so on—are all treated as true in Clojure:

    This creates a new instance of Boolean—and that’s already wrong! Because there are only two possible values of Boolean, an instance of each has already been made for us—they’re named true and false.[2] But here we’ve gone and done it anyway, created a new instance of Boolean and stored it in a var named evil-false. It looks like false:

    2 Clojure’s true and false instances are the same as Java’s Boolean/TRUE and Boolean/FALSE, respectively.