静的型付け言語の潜在開発生産性は今の100倍
■ このスレッドは過去ログ倉庫に格納されています
0057デフォルトの名無しさん
2013/03/10(日) 23:23:37.35| bag |
bag := Dictionary new.
FileStream fileNamed: 'sample.txt' do: [:file |
[file atEnd] whileFalse: [
(file nextLine subStrings: ' ') do: [:str |
bag at: str put: (bag at: str ifAbsent: [0]) + 1
]
]
].
bag associationsDo: [:assoc | Transcript showln: assoc]
■ このスレッドは過去ログ倉庫に格納されています