mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
15 lines
180 B
Perl
15 lines
180 B
Perl
|
|
|
|
|
|
function addone(a)
|
|
return a + 1
|
|
end
|
|
|
|
|
|
local a1 = terralib.cast(int -> int, addone)
|
|
|
|
terra dofn(a : int -> int)
|
|
return a(3)
|
|
end
|
|
local test = require("test")
|
|
test.eq(dofn(a1),4) |