Scala metaprogramming ACO