Common sorted list: Difference between revisions

Content added Content deleted
(→‎{{header|Clojure}}: Add point-free version)
imported>Maxima enthusiast
No edit summary
Line 761: Line 761:
{{out}}
{{out}}
<pre>{1, 3, 4, 5, 7, 8, 9}</pre>
<pre>{1, 3, 4, 5, 7, 8, 9}</pre>

=={{header|Maxima}}==
<syntaxhighlight lang="maxima">
common_sorted(lst):=unique(flatten(lst))$
nums:[[5,1,3,8,9,4,8,7],[3,5,9,8,4],[1,3,7,9]]$
common_sorted(nums);
</syntaxhighlight>
{{out}}
<pre>
[1,3,4,5,7,8,9]
</pre>


=={{header|Nim}}==
=={{header|Nim}}==