Breaking News: Grepper is joining You.com.
Check it out

# how to make recursive function

## how to make recursive function

5
Popularity 10/10 Helpfulness 2/10 Language c
Source: Grepper
Tags:
Contributed on Aug 09 2021
L'homme habile

## Recursive Functions

0

In this lesson, you will be given a brief introduction to recursion and go over how recursion is implemented in Scala.

We'll cover the following

Recursion

Scala’s Implementation

Implementing Recursive Functions Using match

Recursive functions play an essential role in functional programming. But what are recursive functions?

Recursive functions are functions which call themselves in their own function body. This may seem a bit strange right now, but let’s see how this works.

Recursion

Recursion is the process of breaking down an expression into smaller and smaller expressions until you’re able to use the same algorithm to solve each expression.

A recursive function is made up of an if-else expression. The if represents the base case which is the smallest possible expression on which an algorithm will run and the else represents the recursive call; when a function calls itself, it is known as a recursive call. The recursive function will keep calling itself in a nested manner without terminating the call until it is equivalent to the base case in which case the algorithm will be applied, and all the function calls will move in an outward manner, terminating before moving on to the next one, reducing themselves until they reach the original function call.

Popularity 9/10 Helpfulness 1/10 Language scala
Source: Grepper
Tags:
Contributed on May 23 2023
Sumit Rawal

## recursion example

0
Popularity 9/10 Helpfulness 1/10 Language java
Source: Grepper
Tags:
Contributed on Sep 01 2023
Breakable Boar

## recursive function

0
Popularity 10/10 Helpfulness 1/10 Language python
Tags:
Contributed on Nov 05 2021
Bored Butterfly

## working of a recursive function

-1
Popularity 10/10 Helpfulness 1/10 Language javascript
Tags:
Contributed on Mar 29 2022