Originally posted by Chris Patti: Aha! I finally get it! So an Expando is just a map that lets you call methods on it which are actually the map's keys, and the values are a closure that does whatever you want it to do.
Just to make sure you caught it, a map in Groovy lets you use keys as methods (syntactically) too. See the doSomething key in my example, which worked for both map and Expando.
The primary difference was for toString, hashCode, and equals - the map won't let you override them but Expando does.