Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
-- sin, cos and sqrt are built-in, square, asin and acos are user-defined
|
||||
A = [#sin, #cos, #square]
|
||||
B = [#asin, #acos, #sqrt]
|
||||
|
||||
testValue = 0.5
|
||||
|
||||
repeat with i = 1 to 3
|
||||
-- for implementation details of compose() see https://www.rosettacode.org/wiki/Function_composition#Lingo
|
||||
f = compose(A[i], B[i])
|
||||
res = call(f, _movie, testValue)
|
||||
put res = testValue
|
||||
end repeat
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
on square (x)
|
||||
return x*x
|
||||
end
|
||||
|
||||
on asin (x)
|
||||
res = atan(sqrt(x*x/(1-x*x)))
|
||||
if x<0 then res = -res
|
||||
return res
|
||||
end
|
||||
|
||||
on acos (x)
|
||||
return PI/2 - asin(x)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue