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,9 @@
function filternd(sequence array, integer filterid)
sequence res = {}
for i=1 to length(array) do
if call_func(filterid,{array[i]}) then
res = append(res,array[i])
end if
end for
return res
end function

View file

@ -0,0 +1,26 @@
function filterd(sequence a, integer filterid)
integer l = 0
for i=1 to length(a) do
if call_func(filterid,{a[i]}) then
l += 1
a[l] = a[i]
end if
end for
return a[1..l]
end function
function even(integer i)
return and_bits(i,1)=0
end function
constant r_even = routine_id("even")
procedure main()
sequence s = tagset(10), t
t = filterd(s,r_even)
?s
?t
-- automatic pass by reference occurs here for s:
s = filterd(s,r_even)
?s
end procedure
main()