html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title> Kotlin: Lambdas</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-light.min.css">
</head>
<body>
<pre>
<b>Kotlin:</b> <a href="https://kotlinlang.org/docs/reference/lambdas.html"><i>Higher-Order_Functions_and_Lambdas</i></a>
<h2>Lambda Expressions</h2>
Lambda expressions (or function literals) are
also not bound to any entity such as a class,
object, or interface. They can be passed as
arguments to other functions called higher-
order functions.
A lambda expression represents just the block
of a function, and using them reduces the
noise in our code.
If you're a Java coder, you know that Java 8
and above provides support for lambda
expressions.
One of the awesome things about Kotlin is
that lambda expressions are supported out of
the box. Because lambda is not supported in
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
/**
* @Dan&Jel
**/
Enter to Rename, Shift+Enter to Preview
js
js
1
//by @boolean maybe
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run