- 【Python】スクリプト バトルロワイヤル45【pl,rb,php,js】
702 :デフォルトの名無しさん[sage]:2014/08/19(火) 23:38:18.70 ID:UyKyjv+0 - >>683
GNU Smalltalk。 Promiseがあるとだいぶ楽になるね。 | threads count | threads := '.' asFile files collect: [ :file | Promise for: [ file withReadStreamDo: [ :stream | ( ' ' , stream contents ) occurrencesOfRegex: '\bgo*\w'. ]. ]. ]. count := threads inject: 0 into: [ :value :each | value + each value. ]. Transcript show: count printString.
|
|