not-equal?

val-a val-b


Summary

Test whether two values are not equal

Description

This is using equal? under the hood, meaning it can be quite slow since it actually compares the contents of complex data structures.

Arguments

val-a
The first argument
val-b
The second argument

Return value

Whether the two arguments are not equal?

Examples

(not-equal? (array/new '(1 2 3) '(4.0 5.0 6.0) '("7" (array/new 8 88) :9)) (array/new '(1 2 3) '(4.0 5.0 6.0) '("7" (array/new 8 88) :99)))
#t

(not-equal? '(1 :b "c" (array/new 4.0)) '(1 :b "c"))
#t

(not-equal? :a :b)
#t

(not-equal? :a :a)
#f

(not-equal? (array/new '(1 2 3) '(4.0 5.0 (tree/new :a 1 :b 2)) '("7" (array/new 8 88) :9)) (array/new '(1 2 3) '(4.0 5.0 (tree/new :a 1 :a 2)) '("7" (array/new 8 88) :9)))
#t

Bytecode

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

(    0 ($get/val 'equal?))
(    2 ($get/val 'val-a))
(    4 ($get/val 'val-b))
(    6 ($apply 2))
(    8 ($jf* 7))
(   11 ($push/false))
(   12 ($jmp* 4))
(   15 ($push/true))
(   16 ($ret))