/// Create a HashMap
/// 
/// ```rust
/// use mitoo::macro_util::map;
/// let map = map!{"a" => 1, "b" => 2, "c" => 3};
/// ```
#[macro_export]
macro_rules! map {
    ($($key:expr => $value:expr),*) => {
        {
            let mut map = ::std::collections::HashMap::new();
            $(
                map.insert($key, $value);
            )*
            map
        }
    };
}

/// Create a HashSet
/// 
/// ```rust
/// use mitoo::macro_util::set;
/// let set = set!("a", "b", "c");
/// ```
#[macro_export]
macro_rules! set {
    ($($value:expr), *) => {
        {
            let mut v = ::std::collections::HashSet::new();
            $(
                v.insert($value);
            )*
            v
        }
    };
}

#[test]
fn it_works() {
    let set = set!("a", "b");
    println!("{:?}", set);


    let map = map!{
        "a" => 1, 
        "b" => 2
    };
    println!("{:?}", map);
}