Perl 6 is a multi-paradigm programming language. In the previous chapters, we mostly used traditional imperative programming. In this chapter, we will talk about the ways you can use a functional programming style with Perl 6.
These topics will be covered in this chapter:
- Principles of functional programming
- Re-writing traditional programs using recursion
- Reduction operations
- Higher-order functions, lambdas, and the whatever code blocks
- Piping data with feed operators
- Closures, currying, and dynamic scoping
- Lazy and infinite lists and sequence generators
Before we go into any detail of the previously-listed topics, let us talk about what functional programming is.