1.9.0
A command line calculator
25th of April 2026
I am excited to announce a major new feature in Kanipaan: Expanders.
Expanders allow you to define your own functions and mathematical substitutions directly in the CLI. This makes complex calculations much easier to manage and reuse.
To define an expander, use the => operator. The left side specifies the function name and its arguments, and the right side specifies the expression to expand into.
You can define a simple squaring function like this:
kani > f(x) => x ^ 2
Expander added
Now you can use it just like any other operator:
kani > f(5)
25.0
Expanders support multiple arguments as well. For example, to calculate the hypotenuse of a right-angled triangle:
kani > hypot(a, b) => (a ^ 2 + b ^ 2) ^ 0.5
Expander added
kani > hypot(3, 4)
5.0
We call them expanders because they literally expand your input into a larger expression before calculation. This means they are incredibly flexible and can be used for more than just simple functions—they are your own personal mathematical shortcuts.
Stay happy calculating with Kanipaan!
– Karthikeyan (For Kanipaan.)