4 ms·
> One is tempted to ask here: what would be conditions/language changes so we could’ve just written this? > serialize :salary, format: -> csv_currency(_1) > I
by mcphage 3y ago
> One is tempted to ask here: what would be conditions/language changes so we could’ve just written this?
> serialize :salary, format: -> csv_currency(_1)
> I didn’t analyze this deeply, but “intuitively” this seems enough syntax for the interpreter to understand “the next code is one-statement lambda’s body.”
I believe that Swift has an @autoclosure attribute which allows this?