Closed lasiotus closed 1 year ago
This test passes:
#[test] fn eval_add_list() { let result = eval_str("(+ 1 2 3 4)"); assert_eq!(result, Value::from(Into::<IntType>::into(10))); }
But this test fails:
#[test] fn eval_mul_list() { let result = eval_str("(* 1 2 3 4)"); assert_eq!(result, Value::from(Into::<IntType>::into(24))); }
It seems that (* N1 N2 N3 ...) multiplies only the first two numbers, while (+ N1 N2 ...) adds all of them correctly.
Created PR https://github.com/brundonsmith/rust_lisp/pull/24
This test passes:
But this test fails:
It seems that (* N1 N2 N3 ...) multiplies only the first two numbers, while (+ N1 N2 ...) adds all of them correctly.