number?

a


Summary

Test whether val is a number

Description

Right now this means either a floating-point or integer value.

Arguments

val
This argument is going to be tested

Return value

Whether val is a number

Examples

(number? "123")
#f

(number? 'abc)
#f

(number? 123.123)
#t

(number? 123)
#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 :int))
(    2 ($get/val 'type-of))
(    4 ($get/val 'a))
(    6 ($apply 1))
(    8 ($=))
(    9 ($dup))
(   10 ($jt* 20))
(   13 ($drop))
(   14 ($push/val :float))
(   16 ($get/val 'type-of))
(   18 ($get/val 'a))
(   20 ($apply 1))
(   22 ($=))
(   23 ($dup))
(   24 ($jt* 6))
(   27 ($drop))
(   28 ($push/val #f))
(   30 ($ret))