From c96218e31827c3663e431c6f8a4b161209b183e3 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Mon, 2 Oct 2023 15:09:59 +0200 Subject: [PATCH] README: add small code example --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 7091c2e..eea0d5f 100644 --- a/README.md +++ b/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("").expect("couldnt parse typeterm"); +let t2 = dict.parse("< C>").expect("couldnt parse typeterm"); + +assert_eq!( t1.clone().curry(), t2 ); +assert_eq!( t1, t2.clone().decurry() ); +``` ### License [GPLv3](COPYING)