Closed phorward closed 3 years ago
Hey! Shouldn't your README.md example for the recursive evaluation state
fn eval(ast: Ast) -> usize { match ast { Literal(l) => l, Add(left, right) => eval(left) + eval(right), // <-- recursive call to eval missing! } } let val = eval(Add(Literal(1), Literal(2))); val // 3
?
Woops, you're right - I copy pasted that part from a draft with a friend, where I manually corrected it in the actual conversation but not in my draft txt file. Nice catch!
Hey! Shouldn't your README.md example for the recursive evaluation state
?