
Explain first-class functions in Kotlin: treat a function as an object, pass its reference to other parts of the program, and create function-representing objects to pass references.
Explore Kotlin function types, including function type syntax, lambda expressions, extension function types, and type aliases, with practical examples of assigning and invoking functions.
Explore how to instantiate function types in Kotlin using lambda expressions, anonymous functions, and classes, then pass these function literals to higher-order operations like filter.
Explore how a function type object can be invoked, either through a lambda, an anonymous function, or a class that implements the function type by overriding the invoke method.
Explore Kotlin lambda expressions, including their curly-bracket structure, function-type implementation, type inference, and how the last expression determines the return value when invoking a lambda.
Pass a lambda as the last parameter outside the parentheses in Kotlin, enabling concise calls like all to check that all numbers are positive.
Master the it implicit parameter for single-parameter lambdas in Kotlin, omitting the parameter name and producing boolean results, true or false.
Explore the Kotlin :: operator to obtain function references from top-level functions and class methods, assign them to function-type variables, and invoke them.
Demonstrates using the underscore for an unused parameter in a Kotlin lambda, enabling a two-parameter function type to bind to a lambda with a single parameter.
Destructure a point in Kotlin by using the data modifier to decompose it into x and y within a lambda, leveraging component methods and the primary constructor.
This course focuses on the use of lambda expressions in the Kotlin programming language. Apart from explaining how to create new lambda expressions and how to use them, this course provides an in-depth understanding of the underneath implementation. In addition, this course goes through the various possible variations of lambda expressions and explains the role of function types. This course is essential for every software developer that wants to implement the functional programming paradigm in Kotlin. This course is especially recommended for every software developer that already has a basic understanding of this topic.
This course includes theoretical explanations only. It doesn't include coding exercises. The Udemy platform still doesn't support coding exercises in Kotlin.
The course starts with an introduction that includes a small comparison between the various programming languages in the context of functionality been passed over to another part of the program. Following the small introduction, this course explains what is a functional type and how we can instantiate it. The course continues with additional topics, including the 'it' implicit variable, the underscore style, and the use of the :: operator.
If you have in mind a specific topic this course misses please don’t hesitate and let us know. We continuously make a special effort to improve this course. We will make a special effort to add it. While using this course please don’t hesitate and let us know about any explanation that should be improved.