Skip to content

Commit 229d87f

Browse files
committed
update readmes
1 parent 938fc0d commit 229d87f

3 files changed

Lines changed: 35 additions & 27 deletions

File tree

‎exercises/forth/README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ enough.)
2525

2626
Words are case-insensitive.
2727

28+
# Running the tests
29+
30+
You can run all the tests for an exercise by entering
31+
32+
```sh
33+
$ gradle test
34+
```
35+
36+
in your terminal.
37+
2838
## Submitting Incomplete Solutions
2939

3040
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

‎exercises/two-bucket/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To conclude, the only valid moves are:
2727
- emptying one bucket and doing nothing to the other
2828
- filling one bucket and doing nothing to the other
2929

30-
Written with <3 at [Fullstack Academy](http://www.fullstackacademy.com/) by [Lindsay](http://lindsaylevine.com).
30+
Written with <3 at [Fullstack Academy](http://www.fullstackacademy.com/) by Lindsay Levine.
3131

3232
# Running the tests
3333

‎exercises/zipper/README.md‎

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,30 @@
22

33
Creating a zipper for a binary tree.
44

5-
Zippers are a purely functional way of navigating within a data structure and manipulating it. They essentially contain a data structure and a pointer into that data structure (called the focus).
6-
7-
Find out more about Zipper: https://en.wikipedia.org/wiki/Zipper_%28data_structure%29
8-
9-
A zipper should be able to perform these operations:
10-
11-
* `from_tree` (get a zipper out of a rose tree, the focus is on the root node)
12-
* `to_tree` (get the rose tree out of the zipper)
13-
* `value` (get the value of the focus node)
14-
* `prev` (move the focus to the previous child of the same parent, returns a new zipper)
15-
* `next` (move the focus to the next child of the same parent, returns a new zipper)
16-
* `up` (move the focus to the parent, returns a new zipper)
17-
* `left` (move the focus to the left child, returns a new zipper)
18-
* `right` (move the focus to the right child, returns a new zipper)
19-
* `set_value` (set the value of the focus node, returns a new zipper)
20-
* `set_left` (set the left child of the focus node, returns a new zipper)
21-
* `set_right` (set the right child of the focus node, returns a new zipper)
22-
* `insert_before` (insert a new subtree before the focus node, it becomes the prev of the focus node, returns a new zipper)
23-
* `insert_after` (insert a new subtree after the focus node, it becomes the next of the focus node, returns a new zipper)
24-
* `delete` (removes the focus node and all subtrees, focus moves to the next node if possible otherwise to the prev node if possible, otherwise to the parent node, returns a new zipper)
25-
26-
Together with zippers, implement binary tree objects that contains a zipper as the root.
27-
Trees are encoded as nested objects. Each node in the tree has three members: 'value', 'left', and 'right'. Each value is a number (for simplicity). Left and right are trees. An empty node is encoded as null.
28-
Implement `toString` method to print the tree as a single string.
29-
30-
An example of a tree is as follow: tree: value: 1, left: { value: 2, left: null, right: { value: 3, left: null, right: null } }, right: { value: 4, left: null, right: null }
5+
[Zippers](https://en.wikipedia.org/wiki/Zipper_%28data_structure%29) are
6+
a purely functional way of navigating within a data structure and
7+
manipulating it. They essentially contain a data structure and a
8+
pointer into that data structure (called the focus).
9+
10+
For example given a rose tree (where each node contains a value and a
11+
list of child nodes) a zipper might support these operations:
12+
13+
- `from_tree` (get a zipper out of a rose tree, the focus is on the root node)
14+
- `to_tree` (get the rose tree out of the zipper)
15+
- `value` (get the value of the focus node)
16+
- `prev` (move the focus to the previous child of the same parent,
17+
returns a new zipper)
18+
- `next` (move the focus to the next child of the same parent, returns a
19+
new zipper)
20+
- `up` (move the focus to the parent, returns a new zipper)
21+
- `set_value` (set the value of the focus node, returns a new zipper)
22+
- `insert_before` (insert a new subtree before the focus node, it
23+
becomes the `prev` of the focus node, returns a new zipper)
24+
- `insert_after` (insert a new subtree after the focus node, it becomes
25+
the `next` of the focus node, returns a new zipper)
26+
- `delete` (removes the focus node and all subtrees, focus moves to the
27+
`next` node if possible otherwise to the `prev` node if possible,
28+
otherwise to the parent node, returns a new zipper)
3129

3230
# Running the tests
3331

0 commit comments

Comments
 (0)