Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
No, its not, what you are referring to as one line is either method chaining or streaming, both of which are available in non-functional languages. Functional programming is a paradigm which works on immutable data without side effects and treats functions as variables.
-
piperguy1655ylet sumOfSquares = n => [...Array(n).keys()].map(x => x * x).reduce((x, y) => x + y);
@yellow-dog not convinced! -
If you are able to do it in one line and that is a result of the syntax of the language you are using.
Related Rants
Functional programming is just writing everything as a one liner!!!
Change my mind
rant
geeks
programming