head_map

Macro head_map 

Source
macro_rules! head_map {
    {$(($state:expr, $symbol:literal) -> $direction:ident($next:expr, $write:literal)),* $(,)?} => { ... };
}
Expand description

a macro to create a HashMap of rules for a Turing machine. The macro takes a list of rules in the form of

    (state, symbol) -> Direction(next_state, next_symbol)

§Basic Usage

let rules = rstm_core::head_map! {
    (0, 1) -> Right(0, 1),
    (0, 0) -> Left(1, 1),
    (1, 1) -> Right(0, 0),
};