Set consolidation: Difference between revisions

→‎{{header|Haskell}}: Added output (see talk page)
m (→‎{{header|Common Lisp}}: "trans" template used)
(→‎{{header|Haskell}}: Added output (see talk page))
Line 750:
| otherwise = comb ss (s `S.union` s')
</lang>
 
{{Out}}
<pre>*Main> consolidate [S.fromList "ab", S.fromList "dc"]
[fromList "ab",fromList "cd"]
*Main> consolidate [S.fromList "ab", S.fromList "bc"]
[fromList "abc"]
*Main> consolidate [S.fromList "ab", S.fromList "cd", S.fromList "db"]
[fromList "abcd"]
*Main> consolidate [S.fromList "hik", S.fromList "ab", S.fromList "cd", S.fromList "db", S.fromList "fgh"]
[fromList "abcd",fromList "fghik"]</pre>
 
=={{header|J}}==