mirror of
https://github.com/chrisdone/duet.git
synced 2025-01-06 22:09:02 +03:00
Concise
This commit is contained in:
parent
93a1cd03d9
commit
7dd81ed31d
21
README.md
21
README.md
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user