diff options
Diffstat (limited to 'lib/ur/listPair.ur')
-rw-r--r-- | lib/ur/listPair.ur | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ur/listPair.ur b/lib/ur/listPair.ur index a46cf187..8d1c873e 100644 --- a/lib/ur/listPair.ur +++ b/lib/ur/listPair.ur @@ -8,3 +8,14 @@ fun mapX [a] [b] [ctx ::: {Unit}] f = in mapX' end + +fun all [a] [b] f = + let + fun all' ls1 ls2 = + case (ls1, ls2) of + ([], []) => True + | (x1 :: ls1, x2 :: ls2) => f x1 x2 && all' ls1 ls2 + | _ => False + in + all' + end |