File: and

package info (click to toggle)
scheme9 2025.08.12-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,080 kB
  • sloc: lisp: 16,752; ansic: 11,869; sh: 806; makefile: 237; sed: 6
file content (12 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
R4RS 4.2.1  (and <expression> ...)  ==>  object

The <expression>s are evaluated from left to right, and the value
of the first expression that evaluates to a false value  is returned.
Any remaining expressions are not evaluated. If all the expressions
evaluate to true values, the value of the last expression is returned.
If there are no expressions then #T is returned.

(and (= 2 2) (> 2 1))  ==>  #t
(and (= 2 2) (< 2 1))  ==>  #f
(and 1 2 'c '(f g))    ==>  (f g)
(and)                  ==>  #t