Common sorted list: Difference between revisions

Content added Content deleted
(Added Go)
(Realize in F#)
Line 9: Line 9:
<br><br>
<br><br>


=={{header|Factor}}==
=={{header|F_Sharp|F#}}==
<lang fsharp>
// Common sorted list. Nigel Galloway: February 25th., 2021
printfn "%A" (nums|>Array.reduce(fun n g->n@g)|>List.distinct|>List.sort)
</lang>
{{out}}
<pre>
[1; 3; 4; 5; 7; 8; 9]
</pre>
v=={{header|Factor}}==
Note: in older versions of Factor, <code>union-all</code> is called <code>combine</code>.
Note: in older versions of Factor, <code>union-all</code> is called <code>combine</code>.
{{works with|Factor|0.99 2021-02-05}}
{{works with|Factor|0.99 2021-02-05}}