Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Utils = {}
- function Utils.Matching:matchConstants(C1, C2)
- local Count = 0
- for _, v in next, C1 do
- for _, k in next, C2 do
- if v == k then
- Count = Count + 1
- end
- end
- end
- return Count == #C2
- end
- function Utils.Matching:matchIndexes(I1, I2)
- local Count = 0
- for i, _ in next, I1 do
- for t, _ in next, I2 do
- if i == t then
- Count = Count + 1
- end
- end
- end
- return Count == #I2
- end
- return Utils
Advertisement
Add Comment
Please, Sign In to add comment