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

It results into [1, 2, …(some xs satisfying cond)]. Emit does just that - emit another value into a context where for-expr was used. It emits some of x-es into that array literal.

filter cond xs

More like 1:2:filter cond xs.



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

Search: