Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/06_scope_functions/02_run.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# run

Like [`let`](01_let.md), `run` is another scoping function from the standard library. Basically, it does the same: executes a code block and returns its result.
Like [`let`](01_let), `run` is another scoping function from the standard library. Basically, it does the same: executes a code block and returns its result.
The difference is that inside `run` the object is accessed by `this`. This is useful when you want to call the object's methods rather than pass it as an argument.<div class="language-kotlin" theme="idea" data-min-compiler-version="1.3">

<div class="language-kotlin" theme="idea" data-min-compiler-version="1.3">
Expand Down
2 changes: 1 addition & 1 deletion examples/06_scope_functions/05_also.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# also

`also` works like [`apply`](04_apply.md): it executes a given block and returns the object called.
`also` works like [`apply`](04_apply): it executes a given block and returns the object called.
Inside the block, the object is referenced by `it`, so it's easier to pass it as an argument.
This function is handy for embedding additional actions, such as logging in call chains.

Expand Down