mirror of
https://github.com/kanaka/mal.git
synced 2024-11-10 12:47:45 +03:00
Cleanup mal-value=
This commit is contained in:
parent
97c2c420d5
commit
b6fce2eea0
@ -136,16 +136,10 @@
|
|||||||
(typep value2 'mal-data))
|
(typep value2 'mal-data))
|
||||||
(if (equal (mal-data-type value1) (mal-data-type value2))
|
(if (equal (mal-data-type value1) (mal-data-type value2))
|
||||||
(switch-mal-type value1
|
(switch-mal-type value1
|
||||||
(number (= (mal-data-value value1) (mal-data-value value2)))
|
|
||||||
(boolean (equal (mal-data-value value1) (mal-data-value value2)))
|
|
||||||
(nil (equal (mal-data-value value1) (mal-data-value value2)))
|
|
||||||
(string (string= (mal-data-value value1) (mal-data-value value2)))
|
|
||||||
(symbol (mal-symbol= value1 value2))
|
|
||||||
(keyword (mal-symbol= value1 value2))
|
|
||||||
(list (mal-sequence= value1 value2))
|
(list (mal-sequence= value1 value2))
|
||||||
(vector (mal-sequence= value1 value2))
|
(vector (mal-sequence= value1 value2))
|
||||||
(hash-map (mal-hash-map= value1 value2))
|
(hash-map (mal-hash-map= value1 value2))
|
||||||
(any nil))
|
(any (equal (mal-data-value value1) (mal-data-value value2))))
|
||||||
(when (or (and (mal-list-p value1) (mal-vector-p value2))
|
(when (or (and (mal-list-p value1) (mal-vector-p value2))
|
||||||
(and (mal-list-p value2) (mal-vector-p value1)))
|
(and (mal-list-p value2) (mal-vector-p value1)))
|
||||||
(mal-sequence= value1 value2)))))
|
(mal-sequence= value1 value2)))))
|
||||||
|
Loading…
Reference in New Issue
Block a user