Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Find common elements in a nested list

How to find common elements in nested list, please suggest better solution.

q)list2:((12 18 23 25 45); (7 12 18 24 28); (1 5 8 12 15 16 18))
q){ (x 0) inter (x 1) inter (x 2)} [list2]
  12 18

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

This is a good use case for over (/)

q)(inter/)(12 18 23 25 45;7 12 18 24 28;1 5 8 12 15 16 18)
12 18
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading