Introduction ============ This project aims to provide a simple interface for working with L-systems in the Rust programming language. Examples ======== ```rust let mut system: LSystem<&Fn(&Vec) -> String> = LSystem::with_axiom("b"); system.add_rule('a', "ab"); system.add_rule('b', "a"); assert_eq!(system.next().unwrap(), "b"); assert_eq!(system.next().unwrap(), "a"); assert_eq!(system.next().unwrap(), "ab"); assert_eq!(system.next().unwrap(), "aba"); assert_eq!(system.next().unwrap(), "abaab"); assert_eq!(system.next().unwrap(), "abaababa"); ``` ```rust let mut system: LSystem<&Fn(&Vec) -> String> = LSystem::with_axiom("baaaaaaa"); system.add_rule('b', "a"); system.add_context_rule((Some("b"), 'a', None), "b"); assert_eq!(system.next().unwrap(), "baaaaaaa"); assert_eq!(system.next().unwrap(), "abaaaaaa"); assert_eq!(system.next().unwrap(), "aabaaaaa"); assert_eq!(system.next().unwrap(), "aaabaaaa"); assert_eq!(system.next().unwrap(), "aaaabaaa"); assert_eq!(system.next().unwrap(), "aaaaabaa"); assert_eq!(system.next().unwrap(), "aaaaaaba"); assert_eq!(system.next().unwrap(), "aaaaaaab"); assert_eq!(system.next().unwrap(), "aaaaaaaa"); ```