Sling Academy
Home/Kotlin/Working with Functions in Kotlin

Working with Functions in Kotlin

This series of tutorials teaches you about functions in Kotlin:

  • Basic Functions
    • Defining, calling, and returning values.
  • Advanced Functions
    • Inline, higher-order functions, and lambdas.

1 Defining Your First Function in Kotlin

2 Understanding the Syntax of Functions in Kotlin

3 How to Call a Function in Kotlin

4 Kotlin - Passing Parameters to Functions: Positional and Named Arguments

5 Returning Values from Functions in Kotlin: Basics Explained

6 Using Default Parameter Values in Kotlin Functions

7 How to Write Single-Expression Functions in Kotlin

8 Overloading Functions: Defining Multiple Versions of a Function in Kotlin

9 Introduction to Inline Functions in Kotlin

10 How Inline Functions Optimize Performance in Kotlin

11 Working with Higher-Order Functions in Kotlin

12 Passing Functions as Parameters in Kotlin: A Practical Guide

13 Returning Functions from Functions in Kotlin

14 Kotlin - What Are Lambda Expressions? A Beginner's Guide

15 Writing Lambdas for Anonymous Functions in Kotlin

16 Kotlin - Using Lambdas with Collections: `map`, `filter`, and `reduce`

17 Creating Custom Lambdas for Flexible Logic in Kotlin

18 Understanding Closures in Kotlin Lambdas

19 Kotlin Extension Functions: Adding Methods to Existing Classes

20 Function Literals with Receivers: Advanced Kotlin Lambdas

21 Scoped Functions in Kotlin: `let`, `run`, `apply`, `also`, and `with`

22 Understanding `apply` for Configuring Objects in Kotlin

23 Using `let` to Avoid NullPointerExceptions in Kotlin

24 When to Use `run` vs. `with` in Kotlin

25 Tail-Recursive Functions: Optimizing Recursion in Kotlin

26 Working with Recursive Functions in Kotlin: Practical Examples

27 How to Handle Functions with Vararg Parameters in Kotlin

28 Creating Generic Functions for Reusable Code in Kotlin

29 Inline vs. Regular Functions in Kotlin: When to Choose Each

30 Combining Functions for Clean and Efficient Kotlin Code

31 Debugging and Testing Functions in Kotlin

32 Best Practices for Naming and Structuring Functions in Kotlin

33 Real-World Use Cases of Functions in Kotlin Applications