1 (defpackage #:success1 (:use :cl)
3 "This defines a simple successful package.
5 This is should all get pulled in and the markdown.md should be equal
10 #:func-that-does-stuff #:noargs #:no-args-and-values #:result-list #:has-no-examples
11 #:values-result #:has-optional #:has-keywords #:has-rest))
13 (in-package #:success1)
15 (defvar *special-variable* nil
28 It is special, and a boolean.
30 When true, it satisfies if coniditions. When NIL, it does not.
31 That may make it seem like it's not very special, but it is.
35 (let ((*special-variable* t)) (go)) => 'let-it-go")
37 (define-condition test-condition nil nil
39 "Simple documentation.
41 For a simple condition."))
43 (defun func-that-does-stuff (path x)
44 "FUNC-THAT-DOES-STUFF PATH X => RESULT
46 RESULT: SUCCESS-RESULT | FAILURE-RESULT
47 SUCCESS-RESULT: (:success FILENAME)
48 FAILURE-RESULT: (:failure FILENAME MSG)
53 X: a random value related to PATH
54 FILENAME: the file this func was run on
55 MSG: a string containing the failure message
59 FUNC-THAT-DOES-STUFF runs all the things against a file and returns
60 as soon as the first func error is found.
62 This second section uses PATH and X as something we should talk about, but
63 doesn't use all the arguments (let's include PATH here for fun)
67 (func-that-does-stuff #P\"path/to/file.lisp\" t) => (:success \"path/to/file.lisp\")
68 (func-that-does-stuff #P\"path/to/error.lisp\" nil) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
72 "RESULT-LIST => RESULT
74 RESULT: FAILURE-RESULT*
75 FAILURE-RESULT: (:failure FILENAME MSG)
79 FILENAME: the file this func was run on
80 MSG: a string containing the failure message
84 RESULT-LIST runs all the things against a file and returns
85 as soon as the first func error is found."
91 RESULT: SUCCESS-RESULT | FAILURE-RESULT
92 SUCCESS-RESULT: (:success FILENAME)
93 FAILURE-RESULT: (:failure FILENAME MSG)
97 FILENAME: the file this func was run on
98 MSG: a string containing the failure message
102 NOARGS runs all the things against a file and returns
103 as soon as the first func error is found.
107 (func-that-does-stuff) => (:success \"path/to/file.lisp\")
108 (func-that-does-stuff) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
111 (defun no-args-and-values ()
112 "NO-ARGS-AND-VALUES => RESULT
118 RESULT-LIST runs all the things against a file and returns
119 as soon as the first func error is found."
122 (defun has-no-examples ()
123 "HAS-NO-EXAMPLES => RESULT
125 RESULT: SUCCESS-RESULT | FAILURE-RESULT
126 SUCCESS-RESULT: (:success FILENAME)
127 FAILURE-RESULT: (:failure FILENAME MSG)
129 ARGUMENTS AND VALUES:
131 FILENAME: the file this func was run on
132 MSG: a string containing the failure message
136 HAS-NO-EXAMPLES runs all the things against a file and returns
137 as soon as the first func error is found."
140 (defun values-result ()
141 "VALUES-RESULT => RESULT1, RESULT2, RESULT3
143 RESULT1: SUCCESS-RESULT | FAILURE-RESULT
144 SUCCESS-RESULT: (:success FILENAME)
145 FAILURE-RESULT: (:failure FILENAME MSG)
147 ARGUMENTS AND VALUES:
149 RESULT2: second result
150 RESULT3: third result
151 FILENAME: the file this func was run on
152 MSG: a string containing the failure message
156 VALUES-RESULT runs all the things against a file and returns
157 as soon as the first func error is found."
160 (defun has-optional (path &optional x)
161 "HAS-OPTIONAL PATH &optional X => RESULT
163 RESULT: SUCCESS-RESULT | FAILURE-RESULT
164 SUCCESS-RESULT: (:success FILENAME)
165 FAILURE-RESULT: (:failure FILENAME MSG)
167 ARGUMENTS AND VALUES:
170 X: a random value related to PATH
171 FILENAME: the file this func was run on
172 MSG: a string containing the failure message
176 HAS-OPTIONAL runs all the things against a file and returns
177 as soon as the first func error is found.
179 This second section uses PATH and X as something we should talk about, but
180 doesn't use all the arguments (let's include PATH here for fun)"
183 (defun has-keywords (path &key x)
184 "HAS-KEYWORDS PATH &key X => RESULT
186 RESULT: SUCCESS-RESULT | FAILURE-RESULT
187 SUCCESS-RESULT: (:success FILENAME)
188 FAILURE-RESULT: (:failure FILENAME MSG)
190 ARGUMENTS AND VALUES:
193 X: a random value related to PATH
194 FILENAME: the file this func was run on
195 MSG: a string containing the failure message
199 HAS-KEYWORDS runs all the things against a file and returns
200 as soon as the first func error is found.
202 This second section uses PATH and X as something we should talk about, but
203 doesn't use all the arguments (let's include PATH here for fun)"
206 (defun has-rest (path &rest x)
207 "HAS-REST PATH &rest X => RESULT
209 RESULT: SUCCESS-RESULT | FAILURE-RESULT
210 SUCCESS-RESULT: (:success FILENAME)
211 FAILURE-RESULT: (:failure FILENAME MSG)
213 ARGUMENTS AND VALUES:
216 X: a random value related to PATH
217 FILENAME: the file this func was run on
218 MSG: a string containing the failure message
222 HAS-REST runs all the things against a file and returns
223 as soon as the first func error is found.
225 This second section uses PATH and X as something we should talk about, but
226 doesn't use all the arguments (let's include PATH here for fun)"