[HARLEQUIN][Common Lisp HyperSpec (TM)] [Previous][Up][Next]


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


[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996, The Harlequin Group Limited. All Rights Reserved.