add function definition and let macros
fix type in defn macro