Skip to content

Instantly share code, notes, and snippets.

@hikoz
Created July 14, 2015 06:16
Show Gist options
  • Select an option

  • Save hikoz/4f62ff267fb99ccbd130 to your computer and use it in GitHub Desktop.

Select an option

Save hikoz/4f62ff267fb99ccbd130 to your computer and use it in GitHub Desktop.

Revisions

  1. hikoz created this gist Jul 14, 2015.
    11 changes: 11 additions & 0 deletions sincoku.clj
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    (let [ws '(進捗 どう です か)
    wc (count ws)
    l (loop [r [] i 0]
    (let [n (rand-int wc)
    s (nth ws n)
    r (conj r s)]
    (if (= n i (dec wc))
    r
    (recur r (if (= n i) (inc i) 0)))))
    s (apply str l)]
    (printf "%s???\n%s文字で煽られました。\n" s (count s)))