changed FunctionNode to use an iterator for FunctionNode children
added NAND example, with grammar adaptation
added KL-adaptation