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))
11 (in-package #:success1)
13 (defun func-that-does-stuff (path x)
14 "FUNC-THAT-DOES-STUFF PATH X => RESULT
16 RESULT: SUCCESS-RESULT | FAILURE-RESULT
17 SUCCESS-RESULT: (:success FILENAME)
18 FAILURE-RESULT: (:failure FILENAME MSG)
23 X: a random value related to PATH
24 FILENAME: the file this func was run on
25 MSG: a string containing the failure message
29 FUNC-THAT-DOES-STUFF runs all the things against a file and returns
30 as soon as the first func error is found.
32 This second section uses PATH and X as something we should talk about, but
33 doesn't use all the arguments (let's include PATH here for fun)
37 (func-that-does-stuff #P\"path/to/file.lisp\" t) => (:success \"path/to/file.lisp\")
38 (func-that-does-stuff #P\"path/to/error.lisp\" nil) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
42 "RESULT-LIST => RESULT
44 RESULT: FAILURE-RESULT*
45 FAILURE-RESULT: (:failure FILENAME MSG)
49 FILENAME: the file this func was run on
50 MSG: a string containing the failure message
54 NOARGS runs all the things against a file and returns
55 as soon as the first func error is found."
61 RESULT: SUCCESS-RESULT | FAILURE-RESULT
62 SUCCESS-RESULT: (:success FILENAME)
63 FAILURE-RESULT: (:failure FILENAME MSG)
67 FILENAME: the file this func was run on
68 MSG: a string containing the failure message
72 NOARGS runs all the things against a file and returns
73 as soon as the first func error is found.
77 (func-that-does-stuff) => (:success \"path/to/file.lisp\")
78 (func-that-does-stuff) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
81 (defun has-no-examples ()
82 "HAS-NO-EXAMPLES => RESULT
84 RESULT: SUCCESS-RESULT | FAILURE-RESULT
85 SUCCESS-RESULT: (:success FILENAME)
86 FAILURE-RESULT: (:failure FILENAME MSG)
90 FILENAME: the file this func was run on
91 MSG: a string containing the failure message
95 HAS-NO-EXAMPLES runs all the things against a file and returns
96 as soon as the first func error is found."
99 (defun values-result ()
100 "VALUES-RESULT => RESULT1, RESULT2, RESULT3
102 RESULT1: SUCCESS-RESULT | FAILURE-RESULT
103 SUCCESS-RESULT: (:success FILENAME)
104 FAILURE-RESULT: (:failure FILENAME MSG)
106 ARGUMENTS AND VALUES:
108 RESULT2: second result
109 RESULT3: third result
110 FILENAME: the file this func was run on
111 MSG: a string containing the failure message
115 VALUES-RESULT runs all the things against a file and returns
116 as soon as the first func error is found."
119 (defun has-optional (path &optional x)
120 "HAS-OPTIONAL PATH &optional X => RESULT
122 RESULT: SUCCESS-RESULT | FAILURE-RESULT
123 SUCCESS-RESULT: (:success FILENAME)
124 FAILURE-RESULT: (:failure FILENAME MSG)
126 ARGUMENTS AND VALUES:
129 X: a random value related to PATH
130 FILENAME: the file this func was run on
131 MSG: a string containing the failure message
135 HAS-OPTIONAL runs all the things against a file and returns
136 as soon as the first func error is found.
138 This second section uses PATH and X as something we should talk about, but
139 doesn't use all the arguments (let's include PATH here for fun)"
142 (defun has-keywords (path &key x)
143 "HAS-KEYWORDS PATH &key X => RESULT
145 RESULT: SUCCESS-RESULT | FAILURE-RESULT
146 SUCCESS-RESULT: (:success FILENAME)
147 FAILURE-RESULT: (:failure FILENAME MSG)
149 ARGUMENTS AND VALUES:
152 X: a random value related to PATH
153 FILENAME: the file this func was run on
154 MSG: a string containing the failure message
158 HAS-KEYWORDS runs all the things against a file and returns
159 as soon as the first func error is found.
161 This second section uses PATH and X as something we should talk about, but
162 doesn't use all the arguments (let's include PATH here for fun)"
165 (defun has-rest (path &rest x)
166 "HAS-REST PATH &rest X => RESULT
168 RESULT: SUCCESS-RESULT | FAILURE-RESULT
169 SUCCESS-RESULT: (:success FILENAME)
170 FAILURE-RESULT: (:failure FILENAME MSG)
172 ARGUMENTS AND VALUES:
175 X: a random value related to PATH
176 FILENAME: the file this func was run on
177 MSG: a string containing the failure message
181 HAS-REST runs all the things against a file and returns
182 as soon as the first func error is found.
184 This second section uses PATH and X as something we should talk about, but
185 doesn't use all the arguments (let's include PATH here for fun)"