Internally recursion with map

2012-08-09 Thread Justin Whear
This code fails to compile with a forward reference error: auto descendantsOf(Node* node) { return join( node.children, join(node.children.map! (descendantsOf).array) ); } Obviously, while functions can be internally recursive and call themselves, it appears that they can't use themselves as

Re: Internally recursion with map

2012-08-09 Thread Justin Whear
On Thu, 09 Aug 2012 22:03:16 +, Justin Whear wrote: This code fails to compile with a forward reference error: auto descendantsOf(Node* node) { return join( node.children, join(node.children.map! (descendantsOf).array) ); } Obviously, while functions can be internally recursive