Recursive methods in Scala

Get started functional programming in Scala.

There is a lot of debates about functional programming vs object oriented programming. This post we will not discuss such thing. Instead we just go over how to do simple recursive functions in Scala.

In Object Oriented Programming, we usually mutate the value and therefore we often go with for loop or while loop. In functional programming, we will not use loops, instead we use recursive methods.

--

--

--

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Predicting one’s future. A Technology powered by Big Data

Book Review: Supercharge Your Applications with GraalVM

Supercharge Your Applications with GraalVM book cover

Password Workflows With NodeJS on AWS

Introducing More Facets Per Category with Contextual Filters

T Die Die

Building an Enterprise-Grade Software

Puppet Code by Example: Part 1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Donald Le

Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

More from Medium

[Akka Stream] Principles behind the mechanisms of delay and use cases compared to throttle

Know about Akka actor and how to create actor child

message passing mpsc

Mac Scala setup