refactor: use pointwise definition for pairwiseMatches as a more idiomatic solution
This commit is contained in:
parent
1d3b9b913d
commit
6bdd553610
1 changed files with 1 additions and 1 deletions
2
Proj2.hs
2
Proj2.hs
|
|
@ -213,7 +213,7 @@ matches :: (Eq a, Show a) => [a] -> [a] -> Int
|
|||
matches xs ys = maximum permutationMatches
|
||||
where
|
||||
permutationMatches = map (pairwiseMatches xs) (permutations ys)
|
||||
pairwiseMatches xs ys = length $ filter (uncurry (==)) $ zip xs ys
|
||||
pairwiseMatches xs = length . filter (uncurry (==)) . zip xs
|
||||
|
||||
-- outputs a list of all possible chords, where a chord is a list of unique
|
||||
-- pitches. this function happens to generate chords such that the pitches are
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue