Hacker News new | past | comments | ask | show | jobs | submit login

    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.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: