This is my notepad where i collect the useful snippets of OpenSCAD code that i use over and over. Some better curated than others, some formatted for clarity some for efficiency.
function unique(m)=
[for(i=[0:len(m)-1])if(search([m[i]],m,1)==[i])m[i]];