News for hackers. Stuff that matters.
Re:R adds native pipe and lambda syntax by dragonwriter on Saturday December 05, 2020 @10:13PM (#25320689)
> Question by someone who is ignorant but interested in functional programming: what is the closest equivalent to these functions in Python?

The equivalent to the function of the first is python’s lambda syntax, there's no simple syntax providing the same function as the pipe.

Re:R adds native pipe and lambda syntax by NashHallucinate on Sunday December 06, 2020 @04:48AM (#25322375)
A pipe merely "pipes" the output of one function as an input to another. For example, | in bash. In Python this can be done the trivial way (by composing) or by using decorators.
Re:R adds native pipe and lambda syntax by dragonwriter on Sunday December 06, 2020 @11:00AM (#25324313)
Yes, it can be done the trivial way in most languages. For deep nestung, that's ugly and awkward, which is why some languages have piping/composition operators [or threading macros] (sometimes more than one). Python has no close equivalent of a piping operator or threading macro (decorators don't seem helpful at all here.)