Java Reference
In-Depth Information
In this chapter, we have learned the following:
• Functional programming involves breaking processes down into steps that can be
applied as a series of functions.
• Functions can return other functions.
• Functions have built-in properties such as length , but can have custom properties
• All functions have call() and apply() methods that can be used to apply the
function to different objects.
• A callback is a function that's provided as an argument to another function. They
can be used to create event-driven asynchronous code that enables a program to con-
tinue running while waiting for an event to happen.
• A closure is the process of keeping a reference to a variable available outside the
scope of the function it was originally defined in.
• Immediately Invoked Function Expressions or IIFEs are functions that are enclosed
in parentheses and immediately followed by double parentheses so that they're in-
voked. They are useful for setting default values.
• Functions are able to dynamically redefine themselves in the body of the function,
depending on certain conditions.
• A recursive function will keep invoking itself until a certain condition is met.
• Currying or partial application is the process of applying one argument at a time to
a function. A new function is returned until all the arguments have been used.
In the next chapter, we'll be looking at the principles of object-oriented programming in
Search WWH ::

Custom Search