| Index: pkg/fasta/test/fibonacci.dart
|
| diff --git a/pkg/fasta/test/fibonacci.dart b/pkg/fasta/test/fibonacci.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e1ab1d5d4d110fe2d416d6dc8da32804a4d6a793
|
| --- /dev/null
|
| +++ b/pkg/fasta/test/fibonacci.dart
|
| @@ -0,0 +1,14 @@
|
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +int fibonacci(int n) {
|
| + if (n < 2) return n;
|
| + return fibonacci(n - 1) + fibonacci(n - 2);
|
| +}
|
| +
|
| +main() {
|
| + for (int i = 0; i < 20; i++) {
|
| + print(fibonacci(i));
|
| + }
|
| +}
|
|
|