functional programming

Learning functional programming in R

Why use functional programming Avoid intermediate objects In any loop, the standard practice is to create a new list before the loop, do some processing for each element of the list in the loop and then add the processing result as an element to the new list (following the same index). It makes programming more fun Thinking about that index i is simply not as fun as working with the whole list.