call()
Call the function that stored in f
(ref
object)
call(f, params)
f
(ref) — A ref
objectparams
(any, optional) — Parameters to be passed to the function stored in f
-
f = ref(some_func())
call(f, 4, 10, 2)
function some_func(x, y, z)
writeln(x ^ 2 + y + z)
stop
' Output:
' 28
' Another example
do_something(writeln())
function do_something(ref: f)
call(f, "Hello")
stop