source: project/wiki/eggref/5/loop @ 37636

Last change on this file since 37636 was 37153, checked in by Mario Domenech Goulart, 12 months ago

eggref/5/loop: add documentation for CHICKEN 5

File size: 1.4 KB
Line 
1[[tags: egg]]
2
3== loop
4
5[[toc:]]
6
7=== Description
8
9A Scheme version of the Common Lisp {{loop}} macro.
10
11=== Author
12
13[[Heinrich Taube]]
14
15=== Requirements
16
17* [[/egg/srfi-1|srfi-1]]
18
19=== Documentation
20
21<syntax>(loop CLAUSE ...)</syntax>
22
23Executes the forms in CLAUSE ... repeatedly. Most loop features of
24CLtL2 (Common Lisp the Language, 2nd Edition) are provided. For more
25information see the
26[[http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_6-1.html|Common Lisp Hyperspec]].
27
28=== Example
29
30<enscript highlight=scheme>
31(loop with a = 0 and b = -1
32      while (< a 10)
33      sum a into foo
34      do (set! a (+ a 1))
35      finally (return (list foo b)))
36;=> (45 -1)
37</enscript>
38
39=== Version
40
41; 1.5 : Ported to CHICKEN 5 (patch by Massimo Nocentini)
42; 1.2 : fixed dependencies
43; 1.1 : Ported to CHICKEN 4 by [[/users/felix winkelmann|felix winkelmann]]
44; 1.0 : Initial import
45
46=== License
47
48  Copyright (C) 2002 Heinrich Taube (taube@uiuc.edu)
49 
50  This program is free software; you can redistribute it and/or
51  modify it under the terms of the GNU General Public License
52  as published by the Free Software Foundation; either version 2
53  of the License, or (at your option) any later version.
54 
55  This program is distributed in the hope that it will be useful,
56  but WITHOUT ANY WARRANTY; without even the implied warranty of
57  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
58  GNU General Public License for more details.
Note: See TracBrowser for help on using the repository browser.