2 ms·
return [a, b, c].filter({ $0 > 4 }).count > 1 I disagree that your version is elegant. Succinct, yes, but I don’t think I’d like to leave that for the next guy
by mikeash 9y ago
return [a, b, c].filter({ $0 > 4 }).count > 1
I disagree that your version is elegant. Succinct, yes, but I don’t think I’d like to leave that for the next guy to discover.
- maxxxxx 9y agoIf you only do C you know this stuff. It gets confusing when you use a few other languages that all have slightly different semantics.