Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/Mutual-recursion/REBOL/mutual-recursion.rebol
Normal file
18
Task/Mutual-recursion/REBOL/mutual-recursion.rebol
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
REBOL [
|
||||
Title: "Mutual Recursion"
|
||||
URL: http://rosettacode.org/wiki/Mutual_Recursion
|
||||
References: [http://en.wikipedia.org/wiki/Hofstadter_sequence#Hofstadter_Female_and_Male_sequences]
|
||||
]
|
||||
|
||||
f: func [
|
||||
"Female."
|
||||
n [integer!] "Value."
|
||||
] [either 0 = n [1][n - m f n - 1]]
|
||||
|
||||
m: func [
|
||||
"Male."
|
||||
n [integer!] "Value."
|
||||
] [either 0 = n [0][n - f m n - 1]]
|
||||
|
||||
fs: [] ms: [] for i 0 19 1 [append fs f i append ms m i]
|
||||
print ["F:" mold fs crlf "M:" mold ms]
|
||||
Loading…
Add table
Add a link
Reference in a new issue