Introduce lib.functions which includes helper functions

Splitting macros and functions into different packages and source code
makes it easier to look at.   Functions currently implemented:
- range: like Python's range
- parse-integer*: parse-integer but junk-allowed is set to t.
This commit is contained in:
2025-02-10 06:31:43 +00:00
parent 5a48b66dd6
commit ef572b992b
4 changed files with 39 additions and 1 deletions

View File

@@ -28,7 +28,7 @@
(fn parse-integers (input) (-> (string) list)
(->> input
(uiop:split-string)
(mapcar (lambda (s) (parse-integer s :junk-allowed t)))
(mapcar #'parse-integer*)
(remove-if #'null)))
(fn read-integers () (-> nil list)