koguro #7069(2008/08/09 07:34 GMT) [ Scheme ] Rating0/2=0.00
with-input-from-fileを使えばもっと短くなりました (284 bytes)。
1
(use util.list)(use srfi-13)(let1 t(hash-table'equal?)(with-input-from-file(car *argv*)(cut port-fold(#0=lambda(s n)(for-each(#0#(w)(hash-table-update! t(string-downcase w)(#0#(l)(if(memq n l)l(cons n l)))'()))(string-split s #[\W]))(+ n 1))1|read-line|))(print(hash-table->alist t)))
Rating0/2=0.00-0+
1 reply [ reply ]
koguro #7069() [ Scheme ] Rating0/2=0.00
with-input-from-fileを使えばもっと短くなりました (284 bytes)。
Rating0/2=0.00-0+