by tomlin · 4y ago · 0 comments
Ruby has decided (for some reason?) to use two ways to declare.
Function(param, param)
and
{ |param, param| }
why? What is a good reason for this?
It would be an anti pattern in design, not sure why Ruby gets a special hall pass.
collect: [ :keyAndValue | (keyAndValue splitAt: '=') last ].
is why.EDIT: (it's been a few months since I used it, so I) made a mistake in the syntax (declared local variable instead of a formal block argument), it's fixed now.