README: add small code example
This commit is contained in:
parent
c7585f353a
commit
c96218e318
1 changed files with 13 additions and 0 deletions
13
README.md
13
README.md
|
@ -61,6 +61,19 @@ this:
|
|||
1696093021:1696093039:1528324679:1539892301:1638141920:1688010253
|
||||
```
|
||||
|
||||
## How to use this crate
|
||||
|
||||
```rust
|
||||
use laddertypes::*;
|
||||
|
||||
let mut dict = TypeDict::new();
|
||||
|
||||
let t1 = dict.parse("<A B~X C>").expect("couldnt parse typeterm");
|
||||
let t2 = dict.parse("<<A B~X> C>").expect("couldnt parse typeterm");
|
||||
|
||||
assert_eq!( t1.clone().curry(), t2 );
|
||||
assert_eq!( t1, t2.clone().decurry() );
|
||||
```
|
||||
|
||||
### License
|
||||
[GPLv3](COPYING)
|
||||
|
|
Loading…
Reference in a new issue