https://github.com/pauloportugal/real-fizzbuzz-clojure
The Real FizzBuzz in Clojure
https://github.com/pauloportugal/real-fizzbuzz-clojure
clojure clojure-spec fizzbuzz
Last synced: 11 months ago
JSON representation
The Real FizzBuzz in Clojure
- Host: GitHub
- URL: https://github.com/pauloportugal/real-fizzbuzz-clojure
- Owner: PauloPortugal
- Created: 2017-05-21T17:04:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-03-04T20:41:18.000Z (about 4 years ago)
- Last Synced: 2025-03-27T14:52:18.733Z (about 1 year ago)
- Topics: clojure, clojure-spec, fizzbuzz
- Language: Clojure
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/PauloPortugal/real-fizzbuzz-clojure.svg?branch=master)
# The Real FizzBuzz in Clojure
Prints out the following for a contiguous range of numbers:
* the number
* `fizz` for numbers that are multiples of `3`
* `buzz` for numbers that are multiples of `5`
* `fizzbuzz` for numbers that are multiples of `15`
* if the number contains a `three` output the text `lucky`, overriding any existing behaviour
* report at the end of the program showing how many times each `word` was substituted
There is also a [Java version](https://github.com/PauloPortugal/real-fizzbuzz-java) and a [Go version](http://github.com/PauloPortugal/real-fizzbuzz-go)
## Example
Running the program over a range from 1-20 one should get the following output:
```
(1 2 lucky 4 buzz fizz 7 8 fizz buzz 11 fizz lucky 14 fizzbuzz 16 17 fizz 19 buzz)
{fizz 4, buzz 3, fizzbuzz 1, lucky 2, integer 10}
```
## Run
```
lein test && lein run 21
```