Currying
Scala allows you to pass multiple parameters in functions or methods. We may want to create intermediate versions of such functions. This gives us more than one version of a single function. In other words, we can break down every function with multiple parameters into single parameter functions. Why would we want to create single parameter functions? The answer to this is, we can leverage it for function composition. For example, we can launch a website with the help of a domain name, hosting, and web platform. See the following example:
WebsitePlatform => DomainName => Host
If you have a function that takes a domain name, another function that takes a website platform, and another function that takes a hosting platform as a parameter, you can compose them together to have a full-fledged website. Functional composition is powerful because it gives you more options together with intermediate functions. A normal function would look like the following:
def makeWebsite(platform...