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

Actually the equivalent of the above Perl 6 code would be:

    f(g(h(a)))
It can get kind of gnarly when any of the values are non-trivial.


Translated directly, yes.

But when you have objects and no piping operator, library designers will often choose to implement pipe flow as method chaining. See e.g. jQuery, Scala's collections or many ORMs, like SQLAlchemy.




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

Search: