native?

val


Summary

Test whether val is a native function

Description

Sometimes also called lambda or subroutine

Arguments

val
This argument is going to be tested

Return value

Whether val is a native function

Examples

(native? (defmacro +123 (a) (+ a 123)))
#f

(native? (defn +123 (a) (+ a 123)))
#f

(native? sin)
#t

Bytecode

Probably only interesting to you if you want to understand more about the Nujel VM or care very much about performance.

(    0 ($push/val :native-function))
(    2 ($get/val 'type-of))
(    4 ($get/val 'val))
(    6 ($apply 1))
(    8 ($=))
(    9 ($ret))