Skip to content

Commit 09bd2e2

Browse files
committed
up
1 parent c2fe385 commit 09bd2e2

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

examples/factorial-half.test.lisp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(import add mul "nat-church.lisp")
2-
(import zero one two three four "nat-church.lisp")
2+
(import zero one two three four five "nat-church.lisp")
33

44
(import factorial "factorial-half.lisp")
55

@@ -8,3 +8,4 @@
88
(assert-equal (factorial two) two)
99
(assert-equal (factorial three) (mul three two))
1010
(assert-equal (factorial four) (mul four (mul three two)))
11+
(assert-equal (factorial five) (mul five (mul four (mul three two))))

examples/factorial-wrap.test.lisp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(import zero? add mul sub1 "nat-church.lisp")
2-
(import zero one two three four "nat-church.lisp")
2+
(import zero one two three four five "nat-church.lisp")
33
(import if true false "bool.lisp")
44
(import Y turing "fixpoint.lisp")
55

@@ -10,12 +10,14 @@
1010
(assert-equal ((Y factorial-wrap) two) two)
1111
(assert-equal ((Y factorial-wrap) three) (mul three two))
1212
(assert-equal ((Y factorial-wrap) four) (mul four (mul three two)))
13+
(assert-equal ((Y factorial-wrap) five) (mul five (mul four (mul three two))))
1314

1415
(assert-equal ((turing factorial-wrap) zero) one)
1516
(assert-equal ((turing factorial-wrap) one) one)
1617
(assert-equal ((turing factorial-wrap) two) two)
1718
(assert-equal ((turing factorial-wrap) three) (mul three two))
1819
(assert-equal ((turing factorial-wrap) four) (mul four (mul three two)))
20+
(assert-equal ((turing factorial-wrap) five) (mul five (mul four (mul three two))))
1921

2022
(import factorial "factorial-wrap.lisp")
2123

examples/factorial.test.lisp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(import add mul "nat-church.lisp")
2-
(import zero one two three four "nat-church.lisp")
2+
(import zero one two three four five "nat-church.lisp")
33

44
(import factorial "factorial.lisp")
55

@@ -8,6 +8,7 @@
88
(assert-equal (factorial two) two)
99
(assert-equal (factorial three) (mul three two))
1010
(assert-equal (factorial four) (mul four (mul three two)))
11+
(assert-equal (factorial five) (mul five (mul four (mul three two))))
1112

1213
;; test equivalence between recursive functions
1314

examples/nat-parigot.lisp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,5 @@
5353
(assert-equal (factorial one) one)
5454
(assert-equal (factorial two) two)
5555
(assert-equal (factorial three) (mul three two))
56-
57-
;; The following number is huge! Sorry~
58-
59-
;; (assert-equal (factorial four) (mul four (mul three two)))
56+
(assert-equal (factorial four) (mul four (mul three two)))
57+
(assert-equal (factorial five) (mul five (mul four (mul three two))))

0 commit comments

Comments
 (0)