Set 9a Ex 9: fix definition of multiplu

This commit is contained in:
Joel Kaasinen
2021-08-10 20:38:43 +03:00
parent c1b9dc5724
commit 5674f579c8
+1 -1
View File
@@ -235,7 +235,7 @@ identity n = [0 .. n - 1]
-- This function shows how permutations can be composed. Do not edit this
-- function.
multiply :: Permutation -> Permutation -> Permutation
multiply p q = map (\i -> p !! (q !! i)) (identity (length p - 1))
multiply p q = map (\i -> p !! (q !! i)) (identity (length p))
permute :: Permutation -> [a] -> [a]
permute = todo