Function zet::do_calculation[][src]

pub fn do_calculation(
    operation: OpName,
    first_operand: &[u8],
    rest: impl IntoIterator<Item = Result<Vec<u8>, Error>>,
    output: impl FnOnce(Box<dyn Iterator<Item = &'_ [u8]> + '_>) -> Result<(), Error>
) -> Result<(), Error>
Expand description

Calculates and prints the set operation named by op. Each file in files is treated as a set of lines:

  • OpName::Union prints the lines that occur in any file,
  • OpName::Intersect prints the lines that occur in all files,
  • OpName::Diff prints the lines that occur in the first file and no other,
  • OpName::Single prints the lines that occur in exactly one file, and
  • OpName::Multiple prints the lines that occur in more than one file.