Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: