It's always annoyed me that I can't write a custom function for Numbers. It would make the spreadsheet so much more useful to me. In Google Apps spreadsheets you can do it, using Javascript.
In other words, you write
function myCustomStuff(a, b) { ... }
and a cell can contain:
=myCustomStuff(A1, B2)
Now, in Yosemite, they have Javascript automation. I wonder if it's possible.