metaprogramming and applicative programming