0

Let's say that

int A=[1 2 3 4];

How to convert it into a Set?

{int} SetA =?
Prarup
  • 7
  • 3

1 Answers1

0
 range r=1..4;
int A[r]=[1, 2 ,3 ,4];

{int} s={A[i] | i in r};

execute
{
  writeln(s);
}

gives

{1 2 3 4}
Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15