I have a problem where i have to manipulate a list of a list of floats. [[Float]]. these list of floats are of length 4. I want to remove duplicates where the first 3 elements are tested, but ignore the 4th one. This is the last part of a multi part problem and i have been banging my head on a wall for a while figuring out how to use this. I cant find any helpful information.
fixDuplicates :: [[Float]] -> [[Float]]
fixDuplcates [[]] = [[]]
fixDuplicates x = nubBy ?
nubBytakes a function to use for comparing elements for equality. Your definition of equality is that two lists are equal if their first three elements match. A straightforward implementation of this is: