How to Combine Multiple Set Operations, i.e. take the Union of 3 sets?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • rfcs

    RFCs for changes to Rust

  • let sets = [h_a, h_b, h_c]; // from https://github.com/rust-lang/rfcs/issues/2023 let intersection = sets .iter() .skip(1) .fold(sets[0].clone(), |acc, hs| { acc.intersection(hs).cloned().collect() });

  • advent-of-code-2022

    Repo containing solutions for Advent of Code 2022 (by ste001)

  • While an experienced programmer, I'm just starting to learn Rust by doing this year's Advent of Code in it. For today's problem Day 03 , I needed to find the intersection of three sets of characters. Using HashSet, I'd expected to be able to do something along the lines of this:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • advent_2022

    Advent of Code 2022, Rust

  • My final version is here if anyone wants some more context, though please limit any feedback to this particular operation (I've got a lot of learning to go). Looking at other's solutions, everyone appeared to either go to chained functional calls like the above (fold, map, filter, etc.) or just implementing intersection from scratch. While I appreciate the elegance of the former approach, I find it, regardless of the language, pretty opaque.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts