Library "MarkovAlgorithm" Markov algorithm is a string rewriting system that uses grammar-like rules to operate on strings of symbols. Markov algorithms have been shown to be Turing-complete, which means that they are suitable as a general model of computation and can represent any mathematical expression from its simple notation. ~ wikipedia . reference: en.wikipedia.org/wiki/Markov_algorithm rosettacode.org/wiki/Execute_a_Markov_algorithm
apply(expression, rules) Aplies rules to a expression. Parameters: expression (string): `string`: Text expression to be formated by the rules. rules (rule[]): `string`: Rules to apply to expression on a string format to be parsed. Returns: - `string _result`: Formated expression. --- Usage: - `apply("101", parse("|0 -> 0||\n1 -> 0|\n0 -> "))`