Skip to content

Commit

Permalink
Added output example
Browse files Browse the repository at this point in the history
  • Loading branch information
codefionn committed Jun 23, 2024
1 parent d36a046 commit b6cb894
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,27 @@ This interpreter and programming language are subject to huge change.
pgcl - *pretty good calculator language* - is a language for basic
calculations. Designed for (*my*) rapid success doing calculations. It is also
an educational tool, which tries to visualize how functional programming
languages *could* work.
languages *could* work:

```
> add x y = x + y
> add1 = add 1
> add 1 2
((\y match (1, y) then (x, y) => (x + y)) 2)
match (1, 2) then (x, y) => (x + y)
(1 + 2)
3
3
3
> add1 2
((\y match (1, y) then (x, y) => (x + y)) 2)
match (1, 2) then (x, y) => (x + y)
(1 + 2)
3
3
3
>
```

It is a functional programming language.

Expand Down

0 comments on commit b6cb894

Please sign in to comment.