README.md in mini_kraken-0.2.00 vs README.md in mini_kraken-0.2.01

- old
+ new

@@ -28,16 +28,16 @@ ### TODO - [ ] Occurs check List-centric relations from Chapter 2 -- [ ] caro -- [ ] cdro -- [ ] conso -- [ ] nullo -- [ ] pairo -- [ ] singletono +- [ ] caro +- [ ] cdro +- [ ] conso +- [ ] nullo +- [ ] pairo +- [ ] singletono ## Installation Add this line to your application's Gemfile: @@ -71,13 +71,13 @@ The two first lines in the above code snippet are pretty standard: - The first line loads the `mini_kraken` library. - The second line add the DSL methods to the current object. -The next line constitutes a trivial `miniKanren` program. -The aim of a `miniKanren` program is to find one or more solutions involving provided variable(s) -and satisfying one or more goals. +The next line constitutes a trivial `miniKanren` program. +The aim of a `miniKanren` program is to find one or more solutions involving the given logical variable(s) +and satisfying one or more goals to the `run_star method. In our example, the `run_star` method instructs `MiniKraken` to find all solutions, knowing that each successful solution: - binds a value to the provided variable `q` and - meets the goal `equals(q, :pea)`. @@ -99,11 +99,12 @@ # Following miniKanren program fails result = run_star('q', [equals(q, :pea), equals(q, :pod)]) puts result # => () ``` In this example, we learn that `run_star` can take multiple goals placed in an array. -The program fails to find a solution since it is not possible to satisfy the two `equals` goals simultaneously. In that case, the `run_star` return an empty list represented as `()` in the output. +The program fails to find a solution since it is not possible to satisfy the two `equals` goals simultaneously. +In case of failure, the `run_star` returns an empty list represented as `()` in the output. ### Example 3 The next example shows the use two logical variables. @@ -125,10 +126,11 @@ disj2(equals(y, :sea), equals(:mountain, y)) ]) puts result # => ((:blue :sea) (:blue :mountain) (:red :sea) (:red :mountain)) ``` - Here, `run_star` takes two logical variables and two `disj2` goals. A `disj2` succeeds if any of its arguments succeeds. + Here, `run_star` takes two logical variables and two `disj2` goals. + A `disj2` succeeds if any of its arguments succeeds. This program finds four distinct solutions for x, y pairs. ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.