1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

( defn condition [ pred ? term ] ( fn [ n ] ( if ( pred ? n ) term "" ) ) ) ( def fizz ( condition # ( zero ? ( mod % 3 ) ) "fizz" ) ) ( def buzz ( condition # ( zero ? ( mod % 5 ) ) "buzz" ) ) ( defn try - conditions [ & amp ; conditions] ( fn [ n ] ( let [ s ( apply str ( map # ( % n ) conditions ) ) ] ( if ( empty ? s ) ( str n ) s ) ) ) ) ( def fizzbuzz ( try - conditions fizz buzz ) ) ( def buzzfizz ( try - conditions buzz fizz ) ) ( map fizzbuzz ( range 1 100 ) ) ( map buzzfizz ( range 1 100 ) ) ( def bang ( condition # ( zero ? ( mod % 7 ) ) "bang" ) ) ( def fizzbuzzbang ( try - conditions fizz buzz bang ) ) ( map fizzbuzzbang ( range 1 106 ) )