Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #11

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 2 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
10 changes: 5 additions & 5 deletions prose/part1/3-scavenge-design.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ state in the process.
```{.haskell law="step/clue/empty"}
∀ (kctx :: Clue) (i :: Maybe Input) (k :: Clue).
step kctx i (clue k empty) =
tellClue (singleton (sub kctx k) completed) *> empty
tellClue (singleton (sub kctx k) completed) *> pure empty
```

Notice the call to `sub` here. We must prepend the current `Clue`
Expand Down Expand Up @@ -1709,7 +1709,7 @@ of the currently accessible clues in the given `Challenge`. Armed with
step kctx i c1 == (z1, empty) &&
step kctx i c2 == (z2, c2') =>
step kctx i (eitherC c1 c2) =
fmap seenToFailed (findClues kctx c2') *>
tellClue (fmap seenToFailed (findClues kctx c2')) *>
step kctx i c2 *>
step kctx i c1
```
Expand Down Expand Up @@ -1758,10 +1758,10 @@ findClues _ (gate _ _) = mempty
findClues kctx (andThen c _) = findClues kctx c
findClues kctx (reward _) = mempty
findClues kctx (clue k empty)
= singleton (kctx <> [k]) completed
= singleton (kctx <> k) completed
findClues kctx (clue k c)
= singleton (kctx <> [k]) seen
<> findClues (kctx <> [k]) c
= singleton (kctx <> k) seen
<> findClues (kctx <> k) c
Comment on lines +1761 to +1764
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The [] doesn't seem to be relevant here because we only know kctx is a data Clue (with a monoid) at this stage.

```


Expand Down