ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   6 Iteration   6.1 The LOOP Facility   6.1.3 Value Accumulation Clauses

6.1.3.5 Examples of SUM clause

 (loop for i of-type fixnum in '(1 2 3 4 5)
       sum i)
 15
 (setq series '(1.2 4.3 5.7))
 (1.2 4.3 5.7)
 (loop for v in series 
       sum (* 2.0 v))
 22.4

Home Previous Up Next Table of Contents Index
© Franz Inc. All Rights Reserved - File last updated 2022-07-25