Please log in to watch this conference skillscast.
Imperative languages allow for iterating through all the elements of a collection using for
and while
loops.
Functional programming, on the other hand, does not adopt such constructs and identifies recursion as a better way to loop over a collection of elements. Functions, like map
and filter
, are then used to capture and expose looping patterns.
This shift of perspective is one of the first differences beginners notice when they start approaching functional programming coming from an imperative background.
Getting accustomed to looping with functional combinators, and building good heuristics about their usage, will certainly help you to improve your grasp on functional programming.
Join Marco in his exploration of functional loops and gain a solid foundation from which to continue learning functional programming.
YOU MAY ALSO LIKE:
Looping Through Functional Loops
Marco Perone
Marco loves to learn, experiment and try new things. He is interested in ideas, patterns and software architectures, with a definite preference for code quality and functional programming. Marco is a mathematician turned into a software developer.