Zulip Chat Archive
Stream: Is there code for X?
Topic: A function to union a list of lists
Mai (Feb 17 2026 at 12:57):
Is there no function to union a list of lists?
Johannes Tantow (Feb 17 2026 at 13:02):
List.flatten
Mai (Feb 17 2026 at 13:05):
That would contain duplicates though
Mai (Feb 17 2026 at 13:06):
I guess I am just looking for a foldl List.union ∅ abbreviation
Johannes Tantow (Feb 17 2026 at 13:14):
You could run dedup afterwards
Aaron Liu (Feb 17 2026 at 13:17):
Do you have to use lists? This sounds like docs#Finset.sup which can union a finset of finsets.
Mai (Feb 17 2026 at 13:18):
I guess I could
Mai (Feb 17 2026 at 13:19):
It's unfortunate you can't use a Finset in mutually recursive types
Last updated: Feb 28 2026 at 14:05 UTC