Releases: lukewilson2002/rsc
Releases · lukewilson2002/rsc
v2.0
- Real named functions! Functions are no longer tokens, and can now be created in a
Computer
, similar to variables.
let mut map = HashMap::<String, &'a Fn(f64) -> f64>::new();
map.insert("sqrt".to_owned(), &|n| n.sqrt());
- RSC is fully generic, now! Types that can support addition, subtraction, and a couple functions necessary in the
Num
trait can be lexed, parsed, and computed with no changes to the RSC source code. - Getting the previous answer with the new
ans
variable.ans
does not exist until you've run a calculation on a Computer already. - Factorial:
5! = 120
v1.2.0
Since v1.0.0:
- v1.1.0's improvements
- Many bug fixes to the parser
- Better errors
- Update to Rust 2018
- Absolute value (
abs -3
and|-3|
) - Library documentation
- Variables (
(x = 3) + 2
becomes5
andx
becomes3
)