Skip to content

Commit 4195a02

Browse files
Mention the reify function in the README
1 parent 693df28 commit 4195a02

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,28 @@ make check
2525

2626
## Examples
2727

28-
`unification` has built-in support for most Python data types:
28+
`unification` has built-in support for unifying most Python data types via the function `unify`:
2929

3030
```python
3131
>>> from unification import *
3232
>>> unify(1, 1)
3333
{}
3434
>>> unify(1, 2)
3535
False
36-
>>> x = var('x')
36+
>>> x = var()
3737
>>> unify((1, x), (1, 2))
3838
{~x: 2}
3939
>>> unify((x, x), (1, 2))
4040
False
4141
```
4242

43+
Unifiable objects containing logic variables can also be reified using `reify`:
44+
45+
```python
46+
>>> reify((1, x), {x: 2})
47+
(1, 2)
48+
```
49+
4350
And most Python data structures:
4451

4552
``` python
@@ -48,7 +55,7 @@ And most Python data structures:
4855
>>> unify({"a": 1, "b": 2}, {"a": x, "b": 2, "c": 3})
4956
False
5057
>>> from collections import namedtuples
51-
>>> ntuple = namedtuple("ntuple", ("a", "b"))
58+
>>> ntuple = namedtuple("ntuple", ("a", "b"))
5259
>>> unify(ntuple(1, 2), ntuple(x, 2))
5360
{~x: 1}
5461
```

0 commit comments

Comments
 (0)