Skip to content

Commit 602cc2f

Browse files
authored
Fix 2 failing examples (#263) (#264)
1 parent 6e59931 commit 602cc2f

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

examples/nonDeterminism.gr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import Vec
66
return : forall {a : Type} . a -> Vec 1 a
77
return x = Cons x Nil
88

9-
join : forall {a : Type, b : Type, n m : Nat}
9+
joinM : forall {a : Type, b : Type, n m : Nat}
1010
. Vec n (Vec m a) -> Vec (n * m) a
11-
join Nil = Nil;
12-
join (Cons xs xss) = xs `append` (join xss)
11+
joinM Nil = Nil;
12+
joinM (Cons xs xss) = xs `append` (joinM xss)
1313

1414
-- Functor operation
1515
fmap : forall {a : Type, b : Type, n : Nat}
@@ -20,7 +20,7 @@ fmap [f] (Cons x xs) = Cons (f x) (fmap [f] xs)
2020
-- Derived bind operation
2121
bind : forall {a : Type, b : Type, n m : Nat}
2222
. Vec n a -> (a -> Vec m b) [n] -> Vec (n * m) b
23-
bind x f = join (fmap f x)
23+
bind x f = joinM (fmap f x)
2424

2525
---------------------------------------------------
2626

examples/pad_left.gr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import Vec
22

3-
monus
4-
: forall {m n : Nat}
5-
. N m -> N n -> N (m - n)
6-
monus m Z = m;
7-
monus Z (S n') = monus Z n';
8-
monus (S m') (S n') = monus m' n'
9-
10-
113
pad_left
124
: ∀ {a : Type, m : Nat, n : Nat}
135
. a [n - m]

0 commit comments

Comments
 (0)