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

In k (kona):

    a:`dog`cat`bird
    c:`brown`black`red
    {`0:,//("See the ";$x;" ";$y;"?\n")}'[c;a]
The string formatting is a bit ugly because I'm not using a dedicated format function, but foreach with multiple data structures is just f'[list;of;arguments].

In other words, it's one character: ' ("each").



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

Search: