Use keywords for loop specific symbols
This commit is contained in:
parent
05fed06cc4
commit
2f01a098ea
1 changed files with 6 additions and 6 deletions
|
@ -10,12 +10,12 @@
|
||||||
(check-type data list)
|
(check-type data list)
|
||||||
(unless data (error "Empty DATA list."))
|
(unless data (error "Empty DATA list."))
|
||||||
(let ((clean-data (remove-if (lambda (x) (or (> x 10) (< x 1))) data)))
|
(let ((clean-data (remove-if (lambda (x) (or (> x 10) (< x 1))) data)))
|
||||||
(loop for score in clean-data
|
(loop :for score :in clean-data
|
||||||
counting (>= score 9) into promoters
|
:counting (>= score 9) :into promoters
|
||||||
counting (<= score 6) into detractors
|
:counting (<= score 6) :into detractors
|
||||||
finally (return (list promoters
|
:finally (return (list promoters
|
||||||
detractors
|
detractors
|
||||||
(length clean-data))))))
|
(length clean-data))))))
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; CALCULATOR
|
;;; CALCULATOR
|
||||||
|
|
Loading…
Add table
Reference in a new issue