Enums, pointers and recursive lambdas