I while ago I wrote a simple Hangman in K, a cousin of J. 6 fairly simple SLoC, and there&#x27;s still some room for golfing it:<p><pre><code>    d: (&quot;aardvark&quot;;&quot;apple&quot;;&quot;peanut&quot;;&quot;etc&quot;);     &#x2F; dictionary
    w: d[*1?#d];                                &#x2F; pick a word
    c: {|&#x2F;w=&#x2F;:x};                               &#x2F; correctly guessed
    b: {{$[x 0;x 1;&quot;_&quot;]}&#x27;+(c[x];w)};            &#x2F; word with blanks
    p: {`0:&quot; &gt; &quot;;*0:`};                         &#x2F; prompt for a letter
    {~&amp;&#x2F;c[x]}{`0:b[x]; x,p[]}&#x2F;&quot;__&quot;; `0:w,&quot;\n&quot;;
</code></pre>
<a href="https:&#x2F;&#x2F;github.com&#x2F;JohnEarnest&#x2F;ok&#x2F;blob&#x2F;gh-pages&#x2F;examples&#x2F;hangman.k" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;JohnEarnest&#x2F;ok&#x2F;blob&#x2F;gh-pages&#x2F;examples&#x2F;han...</a>