Logo

Programming-Idioms

History of Idiom 118 > diff from v48 to v49

Edit summary for version 49 by OC:
New Obj-C implementation by user [OC]

Version 48

2020-07-18, 21:48:23

Version 49

2020-10-11, 00:00:04

Idiom #118 List to set

Create set y from list x.
x may contain duplicates. y is unordered and has no repeated values.

Idiom #118 List to set

Create set y from list x.
x may contain duplicates. y is unordered and has no repeated values.

Variables
y,x
Variables
y,x
Imports
@import Foundation;
Code
NSSet *y=[NSSet setWithArray:x];