printfn / fend

Arbitrary-precision unit-aware calculator
https://printfn.github.io/fend
MIT License
632 stars 51 forks source link

RFE: Optional implicit `_` at start of input line if it starts with an operator #306

Open lunasophia opened 1 month ago

lunasophia commented 1 month ago

I've been exploring fend as a Unixy replacement for the Apple platform calculator Soulver. I bring up Soulver not for the natural language parsing / notebook features, but rather a feature it has for inputting calculations. In Soulver, you can implicitly refer to the result of the previous calculation if you start a new line with an operator.

Consider the following Soulver session:

3 + 5 # 8
* 2 # 16

I know that I can do that with _ in fend, but the implicit result in Soulver helps maintain the "calculator" metaphor and it fits my brain better. Pocket calculators, and every GUI calculator, all work this way.

printfn commented 1 month ago

Thanks for the suggestion, I agree this would be a nice feature :)