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

It is very functional, so it will feel a little different if you aren't used to it.

You will rarely actually use `transduce` though, just like you probably rarely use `reduce`. You use the other two functions, `into` and `sequence` a lot more, and you don't really have to understand what's going on underneath (even if it is is pretty simple):

    sequence(compose(map(x => x + 1),
                     filter(x => x < 10)
                     take(10)),
             [1, 2, 3]);
It is a little different than standard imperative code, but I think you will find that it's more expressive.


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

Search: