# A basic arithmetic expressions evaluator example

**URL:** https://discourse.elm-lang.org/t/a-basic-arithmetic-expressions-evaluator-example/1024
**Category:** Request Feedback
**Created:** [March 27, 2018, 1:13am UTC](https://discourse.elm-lang.org/t/a-basic-arithmetic-expressions-evaluator-example/1024 "2018-03-27T01:13:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dmy/32/702_2.png) [@dmy](https://discourse.elm-lang.org/u/dmy)
#### Post date: [March 27, 2018, 1:13am UTC](https://discourse.elm-lang.org/t/a-basic-arithmetic-expressions-evaluator-example/1024/1 "2018-03-27T01:13:30Z")

</div>

Hi,

I tried to use the error contexts of [elm-tools/parser](http://package.elm-lang.org/packages/elm-tools/parser/latest) to improve the error messages. There is not much to see and this is far from perfect, but hopefuly this can be helpful to get started with this library:

> **[rlefevre/elm-calc-example](https://github.com/rlefevre/elm-calc-example)**
>
> A basic Elm 0.18 arithmetic expressions parser/evaluator example using elm-tools/parser - rlefevre/elm-calc-example

Demo [here](https://rlefevre.github.io/elm-calc-example/), Ellie [there](https://ellie-app.com/bvq3hRHcpa1/1).

Feedback is welcome, particularly if you find some issue or if you have some idea how to make the `chainLeft` function more readable (or anything else).

_Note_: I’m not sure if this is a good idea to put the Ellie link in the github README, tell me if it’s better to remove it.
