(l patternList)
| 1174 | } |
| 1175 | |
| 1176 | func (pl patternList) diff(l patternList) patternList { |
| 1177 | lAlt := make(patternList, len(l)) |
| 1178 | copy(lAlt, l) |
| 1179 | result := make(patternList, 0, len(pl)) |
| 1180 | for _, v := range pl { |
| 1181 | if v != nil { |
| 1182 | match := false |
| 1183 | for i, w := range lAlt { |
| 1184 | if w.eq(v) { |
| 1185 | match = true |
| 1186 | lAlt[i] = nil |
| 1187 | break |
| 1188 | } |
| 1189 | } |
| 1190 | if match == false { |
| 1191 | result = append(result, v) |
| 1192 | } |
| 1193 | } |
| 1194 | } |
| 1195 | return result |
| 1196 | } |
| 1197 | |
| 1198 | func (pl patternList) double() patternList { |
| 1199 | l := len(pl) |