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
8 #:func-that-does-stuff #:noargs #:result-list #:has-no-examples
9 #:values-result #:has-optional #:has-keywords #:has-rest
12 (in-package #:success1)
14 (defun func-that-does-stuff (path x)
15 "FUNC-THAT-DOES-STUFF PATH X => RESULT
17 RESULT: SUCCESS-RESULT | FAILURE-RESULT
18 SUCCESS-RESULT: (:success FILENAME)
19 FAILURE-RESULT: (:failure FILENAME MSG)
24 X: a random value related to PATH
25 FILENAME: the file this func was run on
26 MSG: a string containing the failure message
30 FUNC-THAT-DOES-STUFF runs all the things against a file and returns
31 as soon as the first func error is found.
33 This second section uses PATH and X as something we should talk about, but
34 doesn't use all the arguments (let's include PATH here for fun)
38 (func-that-does-stuff #P\"path/to/file.lisp\" t) => (:success \"path/to/file.lisp\")
39 (func-that-does-stuff #P\"path/to/error.lisp\" nil) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
43 "RESULT-LIST => RESULT
45 RESULT: FAILURE-RESULT*
46 FAILURE-RESULT: (:failure FILENAME MSG)
50 FILENAME: the file this func was run on
51 MSG: a string containing the failure message
55 NOARGS runs all the things against a file and returns
56 as soon as the first func error is found."
62 RESULT: SUCCESS-RESULT | FAILURE-RESULT
63 SUCCESS-RESULT: (:success FILENAME)
64 FAILURE-RESULT: (:failure FILENAME MSG)
68 FILENAME: the file this func was run on
69 MSG: a string containing the failure message
73 NOARGS runs all the things against a file and returns
74 as soon as the first func error is found.
78 (func-that-does-stuff) => (:success \"path/to/file.lisp\")
79 (func-that-does-stuff) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
82 (defun has-no-examples ()
83 "HAS-NO-EXAMPLES => RESULT
85 RESULT: SUCCESS-RESULT | FAILURE-RESULT
86 SUCCESS-RESULT: (:success FILENAME)
87 FAILURE-RESULT: (:failure FILENAME MSG)
91 FILENAME: the file this func was run on
92 MSG: a string containing the failure message
96 HAS-NO-EXAMPLES runs all the things against a file and returns
97 as soon as the first func error is found."
100 (defun values-result ()
101 "VALUES-RESULT => RESULT1, RESULT2, RESULT3
103 RESULT1: SUCCESS-RESULT | FAILURE-RESULT
104 SUCCESS-RESULT: (:success FILENAME)
105 FAILURE-RESULT: (:failure FILENAME MSG)
107 ARGUMENTS AND VALUES:
109 RESULT2: second result
110 RESULT3: third result
111 FILENAME: the file this func was run on
112 MSG: a string containing the failure message
116 VALUES-RESULT runs all the things against a file and returns
117 as soon as the first func error is found."
120 (defun has-optional (path &optional x)
121 "HAS-OPTIONAL PATH &optional X => RESULT
123 RESULT: SUCCESS-RESULT | FAILURE-RESULT
124 SUCCESS-RESULT: (:success FILENAME)
125 FAILURE-RESULT: (:failure FILENAME MSG)
127 ARGUMENTS AND VALUES:
130 X: a random value related to PATH
131 FILENAME: the file this func was run on
132 MSG: a string containing the failure message
136 HAS-OPTIONAL runs all the things against a file and returns
137 as soon as the first func error is found.
139 This second section uses PATH and X as something we should talk about, but
140 doesn't use all the arguments (let's include PATH here for fun)"
143 (defun has-keywords (path &key x)
144 "HAS-KEYWORDS PATH &key X => RESULT
146 RESULT: SUCCESS-RESULT | FAILURE-RESULT
147 SUCCESS-RESULT: (:success FILENAME)
148 FAILURE-RESULT: (:failure FILENAME MSG)
150 ARGUMENTS AND VALUES:
153 X: a random value related to PATH
154 FILENAME: the file this func was run on
155 MSG: a string containing the failure message
159 HAS-KEYWORDS runs all the things against a file and returns
160 as soon as the first func error is found.
162 This second section uses PATH and X as something we should talk about, but
163 doesn't use all the arguments (let's include PATH here for fun)"
166 (defun has-rest (path &rest x)
167 "HAS-REST PATH &rest X => RESULT
169 RESULT: SUCCESS-RESULT | FAILURE-RESULT
170 SUCCESS-RESULT: (:success FILENAME)
171 FAILURE-RESULT: (:failure FILENAME MSG)
173 ARGUMENTS AND VALUES:
176 X: a random value related to PATH
177 FILENAME: the file this func was run on
178 MSG: a string containing the failure message
182 HAS-REST runs all the things against a file and returns
183 as soon as the first func error is found.
185 This second section uses PATH and X as something we should talk about, but
186 doesn't use all the arguments (let's include PATH here for fun)"