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

The Raku programming language has, with some tweaks:

    data.store.book.grep(*.price < 10).map(*.title)
Although personally I would write that as:

    data.store.book.map: { .title if .price < 10 }
which combines the filter / map into a single operation.

https://raku.org




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

Search: