aboutsummaryrefslogtreecommitdiff
path: root/entries/fbanados/fib.st
diff options
context:
space:
mode:
authorBraxton Hall2022-10-24 17:40:13 +0000
committerGitHub2022-10-24 17:40:13 +0000
commit364ddac06a7fbbb52876251b55de856db2292436 (patch)
treeabf06da417513538f12799ef82e8c9bc8144a174 /entries/fbanados/fib.st
parentb9ab257c2d46a832e0b3bb904bc40e59daa42481 (diff)
parent3f2544bf59ebd4839a6e545cd067a4e0c8cb349a (diff)
Merge pull request #19 from fbanados/fbanados
fbanados in coq.
Diffstat (limited to 'entries/fbanados/fib.st')
-rw-r--r--entries/fbanados/fib.st8
1 files changed, 8 insertions, 0 deletions
diff --git a/entries/fbanados/fib.st b/entries/fbanados/fib.st
new file mode 100644
index 0000000..099407c
--- /dev/null
+++ b/entries/fbanados/fib.st
@@ -0,0 +1,8 @@
+'From Pharo10.0.0 of 15 June 2022 [Build information: Pharo-10.0.0+build.521.sha.14f541319d443f4261f84f4fa19fbb34460a5edb (64 Bit)] on 24 October 2022 at 11:26:20.436554 am'!
+
+!Integer methodsFor: '*Fibonacci' stamp: 'FelipeBanados 10/24/2022 11:13'!
+fibonacciNumber
+ self <= 2 ifTrue: [ ^ 1 ].
+ ^ (self - 1) fibonacciNumber + (self - 2) fibonacciNumber.
+
+! !