Peter Norvig <pnorvig at google.com>: > [Sum: x*x for x in numbers] > [Product: Prob_spam(word) for word in email_msg] > [Min: temp(hour) for hour in range(24)] > [Top(10): humor(joke) for joke in jokes] > [Argmax: votes[c] for c in candidates] Interesting idea, but I'm a bit worried by the enclosing [], which suggests that a list is being constructed, whereas in most of your examples the result isn't a list. I still think it would be fun if Python had an "up" operator, so with suitably defined accumulator objects you could say things like total = add up my_numbers product = multiply up some_probabilities Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4