Skip to content

Takes a number and calculates the number of steps to reach 1 using steps outlined in the Collatz Conjecture.

License

Notifications You must be signed in to change notification settings

kgengler/collatz-clojure

Repository files navigation

collatz-clojure

Build Status

Takes a number and calculates the number of steps to reach 1 using steps outlined in the Collatz Conjecture.

see https://en.wikipedia.org/wiki/Collatz_conjecture

Build

lein compile

lein uberjar

Test

lein test

Run

java -jar target/uberjar/collatz-clojure-${VERSION}-standalone.jar ${INPUT}

Example Usage

$ lein compile
$ lein uberjar
Compiling collatz-clojure.core
Created target/uberjar/collatz-clojure-0.1.0-SNAPSHOT.jar
Created target/uberjar/collatz-clojure-0.1.0-SNAPSHOT-standalone.jar
$ java -jar target/uberjar/collatz-clojure-0.1.0-SNAPSHOT-standalone.jar 8
3

About

Takes a number and calculates the number of steps to reach 1 using steps outlined in the Collatz Conjecture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published