This comment is reply for 2153 sumim: Squeak Smalltalk で。(全ての組み合わせ). Go to thread root.
sumim #2171(2007/08/14 14:43 GMT) [ Smalltalk ] Rating0/0=0.00
ether さんの #2152 の簡潔さに感心しつつ、それをヒントにして同様のことを Squeak Smalltalk で。
1 2 3 4
| input | input := #((0 1) 'ab' (foo bar)). ^input reversed inject: #(()) into: [:arrs :colln | colln inject: #() into: [:rs :elem | rs, (arrs collect: [:arr | {elem}, arr])]]
Rating0/0=0.00-0+
[ reply ]
sumim
#2171()
[
Smalltalk
]
Rating0/0=0.00
| input | input := #((0 1) 'ab' (foo bar)). ^input reversed inject: #(()) into: [:arrs :colln | colln inject: #() into: [:rs :elem | rs, (arrs collect: [:arr | {elem}, arr])]]Rating0/0=0.00-0+