Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Update README.md #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions src/data/docs/tour/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ show-carets: true
.> view base.List.reverse

base.List.reverse : [a] -> [a]
base.List.reverse as =
use base.List +:
base.List.foldl (acc a -> a +: acc) [] as
base.List.reverse as = foldl (acc a -> a +: acc) [] as
```

Notice that `view` shows the `foldl` name now, so the rename has taken effect. Nice!
Expand All @@ -143,12 +141,13 @@ title: ucm


Here's the changes I undid:
Here are the changes I undid

> Moves:
Name changes:

Original name New name
base.List.foldLeft base.List.foldl
Original Changes
1. base.List.foldLeft 2. base.List.foldl (added)
3. base.List.foldLeft (removed)

.>
```
Expand Down Expand Up @@ -284,7 +283,7 @@ square x = x * x

use test

test> square.tests.ex1 = check (square 4 == 16)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check (square 4 == 16) ought to work, so let's get to the bottom of that before updating the docs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ucm UI that opens show in the package base then test that the operator === and not == exist...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

test> square.tests.ex1 = check (square 4 === 16)
```

Save the file, and Unison comes back with:
Expand All @@ -294,7 +293,7 @@ Save the file, and Unison comes back with:
title: ucm
show-numbers: false
---
8 | test> square.tests.ex1 = check (square 4 == 16)
8 | test> square.tests.ex1 = check (square 4 === 16)

✅ Passed : Proved.
```
Expand All @@ -308,7 +307,7 @@ The `check` function has type `Boolean -> Test.Result`. It takes a `Boolean` exp

### A property-based test

Let's test this a bit more thoroughly. `square` should have the property that `square a * square b == square (a * b)` for all choices of `a` and `b`. The testing library supports writing property-based tests like this. There's some new syntax here, explained afterwards:
Let's test this a bit more thoroughly. `square` should have the property that `square a * square b === square (a * b)` for all choices of `a` and `b`. The testing library supports writing property-based tests like this. There's some new syntax here, explained afterwards:

```unison
---
Expand Down