From 3b00a272efd4071af6c8eef4f8fa86e0dd048fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Listochkin=20=28=D0=90=D0=BD=D0=B4=D1=80=D0=B5?= =?UTF-8?q?=D0=B9=20=D0=9B=D0=B8=D1=81=D1=82=D0=BE=D1=87=D0=BA=D0=B8=D0=BD?= =?UTF-8?q?=29?= Date: Tue, 4 Feb 2025 18:45:31 +0000 Subject: [PATCH] typos Co-authored-by: Jonathan Pallant --- exercise-book/src/calculator.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercise-book/src/calculator.md b/exercise-book/src/calculator.md index 1ccdb532..fac37d93 100644 --- a/exercise-book/src/calculator.md +++ b/exercise-book/src/calculator.md @@ -15,9 +15,9 @@ You will learn: ## Task Write a library that parses and evaluates math expressions that use [Reverse-Polish (postfix) notation](https://en.wikipedia.org/wiki/Reverse_Polish_notation). -For example, a string `"3 1 + 2 /"` in this notation is equivalent to `(3 + 1) / 2` but unlike the later it does not force us to handle operator precedence using parenthesis. +For example, a string `"3 1 + 2 /"` in this notation is equivalent to `(3 + 1) / 2` but unlike the later it does not force us to handle operator precedence using parentheses. -We will support the 4 basic math operations (`+`, `-`, `*`, `/`) that all will expect two operants, and a `sqr` operation to square a single number. +We will support the 4 basic math operations (`+`, `-`, `*`, `/`) that all will expect two operands, and a `sqr` operation to square a single number. Here's a basic grammar of expressions that we can expect: @@ -491,7 +491,7 @@ fn square() { Some observations: -* Every branch of our big `match` statement eds up producing an expression. +* Every branch of our big `match` statement ends up producing an expression. * Every time we `pop` expressions from the stack we have to box them. So, here's a plan: