Skip to content

Instantly share code, notes, and snippets.

@jimpil
jimpil / core.clj
Last active July 19, 2023 20:22
Double-Cola (CodeWars) Clojure solutions
(ns double-cola.core)
;Sheldon, Leonard, Penny, Rajesh and Howard are in the queue
;for a "Double Cola" drink vending machine; there are no other
;people in the queue. The first one in the queue (Sheldon) buys
;a can, drinks it and doubles! The resulting two Sheldons go to
;the end of the queue. Then the next in the queue (Leonard) buys
;a can, drinks it and gets to the end of the queue as two Leonards,
;and so on.