Skip to content

manganomori/clj-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clojure Calculator

Simple Clojure calculator written to learn how to code in Clojure lang.

TODO

  • Implement tests
  • Make use of namespaces
  • Allow to execute using a bash script instead calling lein exec..

Setup

Just run:

lein install

Using

./calc funcname param1 param2 param3 etc

Example

./calc + 1 2 # => 3

Functions

Sum

+ 1 2 ; => 3.00
+ 8.3 10 100 ; => 118.30
+ -29 -13 ; => -42.00

Minus

- 1 2 ; => -1.00
- 108.3 100 ; => 8.30
- -29 13 ; => -42.00

Division

/ 1 2 ; => 0.50
/ 108.3 100 ; => 1.08
/ -29 13 ; => -2.23

Multiply

\* 1 2 ; => 2.00
\* 108.3 100 ; => 10830.00
\* -29 13 ; => -377.00

About

Simple calculator written in Clojure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •