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

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Update to what is really displayed
In the test code there was an error `==` instead of `===` ...made me search a few minutes
  • Loading branch information
samuelsayag authored Jul 15, 2021
1 parent 5371a10 commit 784ac92
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/data/docs/tour/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ We __do__ need something else to make it nice to work with content-addressed cod

When first launching Unison in a new directory, we get a message like:

> No codebase exists here so I'm initializing one in: .unison/v2
> No codebase exists in </your/home/directory>.
> Run `ucm init` to create one there, then try again; or `ucm -codebase <dir>` to load a codebase from someplace else!
What's happening here? This is the Unison Codebase Manager starting up and initializing a fresh codebase. We're used to thinking about our codebase as a bag of text files that's mutated as we make changes to our code, but in Unison the codebase is represented as a collection of serialized syntax trees, identified by a hash of their content and stored in a collection of files inside of that `.unison/v2` directory.

Expand Down Expand Up @@ -114,9 +115,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 +142,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 +284,7 @@ square x = x * x
use test
test> square.tests.ex1 = check (square 4 == 16)
test> square.tests.ex1 = check (square 4 === 16)
```

Save the file, and Unison comes back with:
Expand All @@ -294,7 +294,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 +308,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

0 comments on commit 784ac92

Please sign in to comment.