3 ms·
> for (minion in party) { > Just little things like not having 'for (var minion in party)'. It clears the clutter. Would be even less cluttered if it allowed
by vorg 10y ago
> for (minion in party) {
> Just little things like not having 'for (var minion in party)'. It clears the clutter.
Would be even less cluttered if it allowed
for minion in party {
minion.jumpToTheLeft()
}
Parens around a for clause when there's braces following are unnecessary.
- msdos 10y agoIt'd be less cluttered if "in" wasn't in there.
- MichaelBurge 10y agoThe shortest is Haskell's: forM_ party jumpToTheLeft Assuming there is a 'party :: [ Minion ]' and 'jumpToTheLeft :: Minion -> IO Minion' in scope.