Follow

design question: does this look tidy enough to not need lambdas?

something | where ( fn ( var i ) { ... } ) ;

equivalent lambda for the same thing:

something | where ( i => { ... } ) ;

note that with the first one, the method parameter can declare the parameters, so this would be possible too:

something | where { ... /* in terms of i */ }

Here, 'where' would be declared like this:

_enum<t> where( fn ( t i ).body ) ;

The tradeoff is it's really tidy, *but* the name of the "each" is fixed.

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!