summaryrefslogtreecommitdiff
path: root/src/scenes/pure_functions.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenes/pure_functions.tsx')
-rw-r--r--src/scenes/pure_functions.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/scenes/pure_functions.tsx b/src/scenes/pure_functions.tsx
index af1cc4f..6025926 100644
--- a/src/scenes/pure_functions.tsx
+++ b/src/scenes/pure_functions.tsx
@@ -26,8 +26,9 @@ const impureFib = (n: number) => {
impureFib;`;
const impureFactFunction = `const impureFact = (n: number): number => {
while (cache.length <= n)
- cache.push(cache.length *
- cache[cache.length - 1]);
+ cache.push(
+ cache.length * cache[cache.length - 1]
+ );
return cache[n];
};
impureFact;`;