ReefVM/examples/mixed-variadic-kwargs.reef
2025-10-05 21:29:30 -07:00

19 lines
295 B
Plaintext

; Mixed variadic and named arguments
; Function takes one fixed param, variadic positional, and kwargs
MAKE_FUNCTION (x ...rest @kwargs) #10
PUSH 'name'
PUSH 'Bob'
PUSH 1
PUSH 2
PUSH 3
PUSH 3
PUSH 1
CALL
HALT
; Return array with all three parts
LOAD x
LOAD rest
LOAD kwargs
MAKE_ARRAY #3
RETURN