Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Obj-c
@import Foundation;
[NSSet setWithArray:x].allObjects

Often, the set can be used directly without a need to create an array by the allObjects message. Original order is not preserved
(distinct x)

New implementation...
< >
programming-idioms.org