JanetDocsI'm feeling luckyGithub sign in

%



    function

    (% dividend divisor)
    
    Returns the remainder of dividend / divisor.


1 exampleSign in to add an example
Loading...
(defn fizzbuzz [n]
  (cond 
    (and
      (= 0 (% n 3))
      (= 0 (% n 5))) "fizzbuzz"
    (= 0 (% n 3)) "fizz"
    (= 0 (% n 5)) "buzz"
    :else n))

(fizzbuzz 1)   # 1
(fizzbuzz 3)   # "fizz"
(fizzbuzz 5)   # "buzz"
(fizzbuzz 15)  # "fizzbuzz"
cellularmitosis