RosettaCodeData/Task/Generator-Exponential/SenseTalk/generator-exponential-1.sensetalk
2023-07-01 13:44:08 -04:00

11 lines
251 B
Text

// 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