From 562731c15499914a9ec13f2744cfa776f66b8357 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Tue, 21 Sep 2021 10:41:09 +0800 Subject: [PATCH] Fix fibonacci example. --- README.md | 4 ++-- scripts/fibonacci.rhai | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3f2ac980..ba6ddf2c 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Example The [`scripts`](https://github.com/rhaiscript/rhai/tree/master/scripts) subdirectory contains sample Rhai scripts. -Below is a the standard _Fibonacci_ example for scripting languages: +Below is the standard _Fibonacci_ example for scripting languages: ```js // This Rhai script calculates the n-th Fibonacci number using a really dumb algorithm @@ -93,7 +93,7 @@ fn fib(n) { } } -print(`Running Fibonacci(28) x ${REPEAT} times...`); +print(`Running Fibonacci(${TARGET}) x ${REPEAT} times...`); print("Ready... Go!"); let result; diff --git a/scripts/fibonacci.rhai b/scripts/fibonacci.rhai index fd3ba5c0..dac77d22 100644 --- a/scripts/fibonacci.rhai +++ b/scripts/fibonacci.rhai @@ -12,7 +12,7 @@ fn fib(n) { } } -print(`Running Fibonacci(28) x ${REPEAT} times...`); +print(`Running Fibonacci(${TARGET}) x ${REPEAT} times...`); print("Ready... Go!"); let result;