DEV Community

Discussion on: Daily Challenge #140 - I love you, a little, a lot, passionately ... not at all

Collapse
 
not_jffrydsr profile image
@nobody

πŸ’šAllons y Clojure: πŸ’™

(ns affairs)

(defonce ^:private Love
 "cause affairs on the heart are private and unique"  
  (fn [n]
    (let [petals ["yes" ;; changed from "I love you" for semantics 
                  "a little" 
                  "a lot" 
                  "passionately" 
                  "madly" 
                  "not at all"]]
   (when (> (int n) 0)
    (get petals (mod  (+ (int n) (count petals))
                     (count petals))))
))