erhanbaris / smartcalc

Text based calculator for peoples
https://erhanbaris.github.io/smartcalc-app/
GNU General Public License v2.0
189 stars 7 forks source link

Add functions or/and tables #19

Open Kedap opened 2 years ago

Kedap commented 2 years ago

I think it would be amazing if you could do things like:

myfancyfunction = f(x) -> x+1
myfancyfunction.start = 1
myfancyfunction.end = 5
myfancyfunction.step = 1

myfancyfunction

| x |      f(x)      |
----------------------
| 1 |       2        |
| 2 |       3        |
| 3 |       4        |
| 4 |       5        |
| 5 |       6        |
erhanbaris commented 2 years ago

It could be nice to have more functionality to define/use functions but we need to have a proper design for function call and definition. I am planning to add some predefined functions (like sin, avg, min, max so on.) Also, I would like to keep calculation syntax simple and easy for everyone.