RosettaCodeData/Task/Generator-Exponential/SenseTalk/generator-exponential-1.sensetalk

12 lines
251 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
// ExponentialGenerator.script
to initialize
set my base to 0
if my exponent is empty then set my exponent to 1 -- default if not given
end initialize
to handle nextValue
add 1 to my base
return my base to the power of my exponent
end nextValue