This commit is contained in:
Chris Done 2019-11-15 17:56:15 +01:00
parent 93a1cd03d9
commit 7dd81ed31d

View File

@ -8,6 +8,7 @@ Running code in Duet literally performs one substitution step at
time. For example, evaluating `(\x -> x + 5) (2 * 3)`, we get:
``` haskell
$ duet run demo.hs
[1]
(\x -> x + 5) (2 * 3)
[2]
@ -20,26 +21,6 @@ time. For example, evaluating `(\x -> x + 5) (2 * 3)`, we get:
Note that this demonstrates basic argument application and non-strictness.
Example `integers.hs`:
```haskell
main = 3 + ((2 + -3) - 3)
```
Output for this program:
``` haskell
$ duet run examples/integers.hs
[1]
3 + ((2 + -3) - 3)
[2]
3 + (-1 - 3)
[3]
3 + -4
[4]
-1
```
## Differences from Haskell
See also the next section for a complete example using all the