diff options
author | Greg Brown <greg.brown01@ed.ac.uk> | 2022-11-25 14:50:07 +0000 |
---|---|---|
committer | Greg Brown <greg.brown01@ed.ac.uk> | 2022-11-25 14:50:07 +0000 |
commit | a66e481e8e0f2238dcab6049e234944e9135e49c (patch) | |
tree | c454b570f625be7a870cb259194ac60e90fec3a8 /src/Soat | |
parent | 643afbac7e1cc56d33e8f652e8e70e00cf07a4be (diff) |
Change recursion structure of map.
Diffstat (limited to 'src/Soat')
-rw-r--r-- | src/Soat/Data/Product.idr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Soat/Data/Product.idr b/src/Soat/Data/Product.idr index 52f9181..e9c3d17 100644 --- a/src/Soat/Data/Product.idr +++ b/src/Soat/Data/Product.idr @@ -63,8 +63,8 @@ indexTabulate f (There elem) = indexTabulate (f . There) elem public export map : (f : (i : a) -> x i -> y i) -> {is : List a} -> x ^ is -> y ^ is -map f {is = []} xs = [] -map f {is = (i :: is)} xs = f _ (head xs) :: map f (tail xs) +map f [] = [] +map f (x :: xs) = f _ x :: map f xs public export (++) : x ^ is -> x ^ js -> x ^ (is ++ js) |