@@ -12,6 +12,7 @@ written.
1212
1313~~~~ Commonlisp
1414(defun function-name (param1 param2 &key (keyword1 default-value))
15+ ;; keywords are optional; optional positional parameters are also available.
1516 ;; implicit progn
1617 )
1718~~~~
@@ -20,7 +21,7 @@ written.
2021
2122
2223~~~~ Commonlisp
23- (defmethod method-name ((object class-name)
24+ (defmethod method-name ((param1 class-name) )
2425 ;; implicit progn
2526 )
2627~~~~
@@ -107,6 +108,9 @@ are my favorite LOOPs
107108
108109(loop for i from 0 upto 10
109110 collect i)
111+
112+ (loop for i from 0 below 10
113+ collect i)
110114
111115(loop for i from 0 upto 10
112116 do
@@ -116,7 +120,7 @@ are my favorite LOOPs
116120 collect
117121 (operate-on ele))
118122
119- (loop for ele in list
123+ (loop for ele across array
120124 collect
121125 (operate-on ele))
122126~~~~
@@ -126,13 +130,13 @@ are my favorite LOOPs
126130The lambda functions is an anonymous function, i.e., unnamed.
127131
128132Here we map over ` numeric-list ` and increment each element in it by 1
129- with ` INCF ` , returning the incremented list.
133+ with ` 1+ ` , returning the incremented list.
130134
131135~~~~ Commonlisp
132136
133137(mapcar
134138 #'(lambda (x)
135- (incf x))
139+ (1+ x))
136140 numeric-list)
137141
138142~~~~
@@ -156,6 +160,8 @@ for details on this very useful form.
156160
157161### Writing a text file
158162
163+ More complete reading and writing of text files can be done by using the ALEXANDRIA library; these
164+ routines are great for starting to customize your own routine.
159165
160166``` Commonlisp
161167(defun write-file (filename data)
0 commit comments