Add tags

Add tags to the following comment

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)))

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...