Skip to content

Commit c4b7900

Browse files
committed
Update node packages, add instructions to README
1 parent 97338b5 commit c4b7900

File tree

2 files changed

+6094
-4615
lines changed

2 files changed

+6094
-4615
lines changed

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ use this library (each interchangeable with another):
1010
- `Expression` AST variants `Abs`, `App`, and `Var`
1111
- Macros `abs!`/`λ!`, `app!`/`γ!`, and `var!`
1212

13-
```rust
14-
let id = λ!{x.x};
15-
let one = λ!{f.λ!{x.γ!(f,x)}};
16-
assert_eq!(1u64, u64::from(app!({id},{one})));
17-
```
13+
```rust
14+
let id = λ!{x.x};
15+
let one = λ!{f.λ!{x.γ!(f,x)}};
16+
assert_eq!(1u64, u64::from(app!({id},{one})));
17+
```
1818

1919
- Parsed λ-calculus strings
2020

21-
```rust
22-
let parser = ExpressionParser::new();
23-
parser.parse(r"\a b.a");
24-
parser.parse(r"\f x.(f (f x))");
25-
parser.parse(r"\\\x y z");
26-
```
21+
```rust
22+
let parser = ExpressionParser::new();
23+
parser.parse(r"\a b.a");
24+
parser.parse(r"\f x.(f (f x))");
25+
parser.parse(r"\\\x y z");
26+
```
2727

2828
- Native types: `u64`, `bool`, `fn` (WIP)
2929

30-
```rust
31-
assert_eq!!{f.λ!{x.γ!(f!(f,x))}}, Expression::from(2u64));
32-
assert_eq!(true, bool::from!{a.λ!{b.a}}));
33-
assert_eq!(1, λ!{x.x}(1));
34-
```
30+
```rust
31+
assert_eq!!{f.λ!{x.γ!(f!(f,x))}}, Expression::from(2u64));
32+
assert_eq!(true, bool::from!{a.λ!{b.a}}));
33+
assert_eq!(1, λ!{x.x}(1));
34+
```
3535

3636
![](extra/site-demo.gif)
3737

@@ -68,6 +68,8 @@ First make sure you have `wasm-pack` installed. Then:
6868

6969
```
7070
wasm-pack build
71+
cd examples/site
72+
npm run serve
7173
```
7274

7375
[example/site]: https://github.com/nixpulvis/lalrpop-lambda/blob/master/examples/site/index.js

0 commit comments

Comments
 (0)