Common list elements: Difference between revisions

m
(Added Easylang)
m (→‎{{header|Wren}}: Minor tidy)
Line 1,230:
{{libheader|Wren-seq}}
As we're dealing here with lists rather than sets, some guidance is needed on how to deal with duplicates in each list in the general case. A drastic solution would be to remove all duplicates from the result. Instead, the following matches duplicates - so if List A contains 2 'a's and List B contains 3 'a's, there would be 2 'a's in the result.
<syntaxhighlight lang="ecmascriptwren">import "./seq" for Lst
 
var common2 = Fn.new { |l1, l2|
Line 1,280:
<br>
Since the above was written, we can also now offer a library based solution.
<syntaxhighlight lang="ecmascriptwren">import "./seq" for Lst
 
var lls = [
9,482

edits