Remove duplicate elements: Difference between revisions

Content added Content deleted
Line 227: Line 227:
Set = sets:from_list(List).</lang>
Set = sets:from_list(List).</lang>


=={{header|F#}}==
=={{header|F sharp|F#}}==
The simplest way is to build a set from the given array (this actually works for any enumerable input sequence type, not just arrays):
The simplest way is to build a set from the given array (this actually works for any enumerable input sequence type, not just arrays):
<lang fsharp>
<lang fsharp>
Line 236: Line 236:
val it : Set<int> = seq [1; 2; 3; 4]
val it : Set<int> = seq [1; 2; 3; 4]
</lang>
</lang>

=={{header|Factor}}==
=={{header|Factor}}==