I've just been reading Marko Rodriguez's excellent blog post about different types of databases. Whilst reading I noticed some syntax...
// put data
db.put('marko');
db.put(31);
db.put(true);
// get data
Iterator results = db.get();
Iterator filteredResults = db.get{it.startsWith('ma')};
...which I presumed was a snippet of Java, but I've never seen a method invoked using curly braces like this before - db.get{it.startsWith('ma')}
.
Any details/thoughts on this would be appreciated!