enki 0.0.1

Asemantic computation and Church-style isomorphism using combinatory logic.
Documentation
use std::collections::HashMap;
pub struct Reactor {
    pub population: HashMap<u64, (Molecule, usize)>, // hash -> (representative molecule, count)
}

fn remove_one(population: &mut HashMap<u64, (Molecule, usize)>, hash: u64) {
    if let Some((_, count)) = population.get_mut(&hash) {
        *count -= 1;
        if *count == 0 {
            population.remove(&hash);
        }
    }
}

fn add_one(population: &mut HashMap<u64, (Molecule, usize)>, mol: Molecule) {
    let hash = molecule_hash(&mol);
    if let Some((_, count)) = population.get_mut(&hash) {
        *count += 1;
    } else {
        population.insert(hash, (mol, 1));
    }
}