Is it possible to place some condition over the ements of Vector of Tuples to creat another Vector of Tuples?
For example, I have buch of tuples demonstraing some properties of devices (property1, property2, deice_ID). besides there are two other vectors IDs, and a Super_property vector showing a special property of a device (alaways length(ID) = length( Super_P)) . For instance, device with ID 4
is special only if it has the proprty of 25
. Based o these how to crreate a vector that only returns the special devices?
Devices = [(25, 504, 4), (24, 518, 9) , (20, 250, 7), (29, 248, 4), (29, 283, 4), (22, 528, 9) , (21, 270, 4), (27, 218, 7), (25, 123, 4), (32, 123, 9)]
ID = [4,7,9]
Super_P = [25, 27, 22]
This is what I’m looking for:
Specials = [ [ (25, 504, 4), (25, 123, 4) ] , (27, 218, 7), (22, 528, 9)]