Skip to content

Commit

Permalink
Remove unnecessary comma removal, simplify boundary checking
Browse files Browse the repository at this point in the history
Some older version of SBCL had commas in the result of `~R`. Since
that no longer seems to be happening we can simplify the code.
  • Loading branch information
verdammelt committed Nov 29, 2023
1 parent 6960898 commit df601a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/practice/say/.meta/example.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
(in-package :say)

(defun say (number)
(unless (or (minusp number) (>= number (expt 10 12)))
(remove #\, (format nil "~R" number))))
(when (< -1 number (expt 10 12))
(format nil "~r" number)))

0 comments on commit df601a9

Please sign in to comment.