Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
sub map(f$, t())
|
||||
local i
|
||||
|
||||
for i = 1 to arraysize(t(), 1)
|
||||
t(i) = execute(f$, t(i))
|
||||
next i
|
||||
end sub
|
||||
|
||||
sub add1(x)
|
||||
return x + 1
|
||||
end sub
|
||||
|
||||
sub square(x)
|
||||
return x * x
|
||||
end sub
|
||||
|
||||
dim t(10)
|
||||
|
||||
for i = 1 to 10
|
||||
t(i) = i
|
||||
print t(i), "\t";
|
||||
next i
|
||||
print
|
||||
|
||||
//map("add1", t())
|
||||
map("square", t())
|
||||
|
||||
for i = 1 to 10
|
||||
print t(i), "\t";
|
||||
next i
|
||||
print
|
||||
Loading…
Add table
Add a link
Reference in a new issue