I'm looking for a nice way to do a map / select on a Lua table.
eg. I have a table :
myTable = {
pig = farmyard.pig,
cow = farmyard.bigCow,
sheep = farmyard.whiteSheep,
}
How do I write myTable.map(function(f) f.getName)? [Assuming all farmyard animals have names]
ie. apply the function to all elements in the table.