Hacker News new | ask | show | jobs
by geocar 1856 days ago

    us←{'_'@{¯1⌽⍵⍷⍨(⊂⊃K),'*'}⍵}
1 comments

Ah, ⍷, clever, don't even need the outer {...⍵},

  us←'_'@{¯1⌽⍵⍷⍨(⊂⊃K),'*'}
Yes!

You could also do: ⌽'*',⊂⊃K to save another character. I don't know if that's "better" though.

Or alternatively '*',⍨⊂⊃K which I think I prefer over ⌽, but neither seem that 'better' in my mind anyway.