-
Notifications
You must be signed in to change notification settings - Fork 0
/
specs.json
42 lines (42 loc) · 1.34 KB
/
specs.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[
{
"version": 0,
"specs": [
{
"expect": "\\x.x",
"toEvaluateTo": "\\x.x",
"because": "trivial lambdas evaluate to themselves"
},
{
"expect": "\\ x . x ",
"toEvaluateTo": "\\x.x",
"because": "whitespace is ignored"
},
{
"expect": "\\012421x%$#@!&*^.DLGKJLKSJGLKSDJx91",
"toEvaluateTo": "\\x.x",
"because": "characters not explicitly known by the tokenizer are ignored"
},
{
"expect": "\\a.\\b.\\c.\\d.\\e.\\f.\\g.\\h.\\i.\\j.\\k.\\l.\\m.\\n.\\o.\\p.\\q.\\r.\\s.\\t.\\u.\\v.\\w.\\x.\\y.\\z.x",
"toEvaluateTo": "\\a.\\b.\\c.\\d.\\e.\\f.\\g.\\h.\\i.\\j.\\k.\\l.\\m.\\n.\\o.\\p.\\q.\\r.\\s.\\t.\\u.\\v.\\w.\\x.\\y.\\z.x",
"because": "The alphabet constitutes valid identifier names"
},
{
"expect": "\\x.\\y.\\z.(x y)",
"toEvaluateTo": "\\x.\\y.\\z.(x y)",
"because": "more complicated lambdas evaluate to themselves"
},
{
"expect": "(\\x.x \\y.y)",
"toEvaluateTo": "\\y.y",
"because": "identity (I) function returns the value its applied to"
},
{
"expect": "((\\x.\\y.x \\y.y) \\z.z)",
"toEvaluateTo": "\\y.y",
"because": "const (K) function returns the value its applied to first"
}
]
}
]