File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ use super::apply_builtin;
9
9
10
10
/// Call a function with the given number of arguments.
11
11
/// First it pops n values from the operand stack where n is the arity of the function.
12
+ /// The values will be the arguments to the function and they are pushed to a vector and reversed.
13
+ /// i.e. the last argument is the top value of the operand stack.
12
14
/// Then it pops the closure from the operand stack.
13
15
/// It checks that the closure is a closure and that the arity of the closure matches the number of arguments.
14
16
/// If the closure is a builtin function it applies the builtin function and returns.
@@ -38,6 +40,8 @@ pub fn call(mut rt: Runtime, arity: usize) -> Result<Runtime> {
38
40
) ;
39
41
}
40
42
43
+ args. reverse ( ) ;
44
+
41
45
let value = rt
42
46
. current_thread
43
47
. operand_stack
You can’t perform that action at this time.
0 commit comments