summaryrefslogtreecommitdiffhomepage
path: root/dart.html.markdown
diff options
context:
space:
mode:
authorAnton Trekov <AntonTrekov@users.noreply.github.com>2022-01-03 19:07:35 +0300
committerGitHub <noreply@github.com>2022-01-04 00:07:35 +0800
commit625f149739623407847752acd414ae7bc9ba8367 (patch)
tree5efcc0c00b1abb85f3d6db878e1e975dbfb82b1e /dart.html.markdown
parentf6d6a9cdaee109fa69df95a4545dfbcbf305ceae (diff)
[Dart/en] Fixed error in example2 (#4035)
* [Dart/en] Fixed example2 * [Dart/en] Simplify example Co-authored-by: Anton Dorozhkin <anton.dorozhkin@lamoda.ru>
Diffstat (limited to 'dart.html.markdown')
-rw-r--r--dart.html.markdown6
1 files changed, 2 insertions, 4 deletions
diff --git a/dart.html.markdown b/dart.html.markdown
index b215474a..37f207f5 100644
--- a/dart.html.markdown
+++ b/dart.html.markdown
@@ -77,13 +77,11 @@ example1() {
nested1();
}
-/// Anonymous functions don't include a name but can take number of arguments
+/// Anonymous functions don't include a name
example2() {
- //// Explicit return type.
- nested1(Function<void> fn) {
+ nested1(fn) {
fn();
}
-
nested1(() => print("Example2 nested 1"));
}