Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

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

View file

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