Move parse-integer*

This commit is contained in:
2025-02-11 00:31:49 +00:00
parent 52f7db44cf
commit bd3a17d678

View File

@@ -27,10 +27,6 @@ each member is STEP distance apart."
(loop :for i :from start :to (1- end) :by step
:collect i)))
(fn parse-integer* (inp) (-> (string) (or integer list))
"Given string INP, attempt to parse an integer. Return NIL otherwise."
(parse-integer inp :junk-allowed t))
(fn take (n lst) (-> (fixnum list) list)
"Return the first N elements of LST."
(subseq lst 0 n))
@@ -54,3 +50,7 @@ where key x in A has associations {y in LST : INDICATOR(y) = x}."
:else
:do (setq assoc-list (cons (list key element) assoc-list))
:finally (return assoc-list)))
(fn parse-integer* (inp) (-> (string) (or integer list))
"Given string INP, attempt to parse an integer. Return NIL otherwise."
(parse-integer inp :junk-allowed t))