[Jprogramming] Recursive verbs
Skip Cave
skip at caveconsulting.com
Tue Nov 27 07:09:30 UTC 2018
How would you write an implicit or explicit recursive verb for this
sequence formula?
a1=.4
a1 , (a2=.1-~2*a1) , (a3=.1+~2*a2) , (a4=.1-~2*a3) , (a5=.1+~2*a4) ...
(an=.1(+-)~2*an-1
The verb would be specified as x f y, where x is the starting integer a1,
and y is the number of terms (n) - or vice versa.
The result will be a vector n items long. Note the alternating sign in each
term
Example:
4 f 5
4 7 15 29 59
Skip
More information about the Programming
mailing list