DEV Community

Discussion on: Daily Coding Puzzles - Nov 11th - Nov 16th

Collapse
 
gypsydave5 profile image
David Wickes

Common Lisp

(defun dont-give-me-five (start end)
  (loop for x from start to end
     when (not (contains-5-p x)) collect x))

(defun contains-5-p (n)
  (position #\5 (write-to-string n)))