diff --git a/src/jolt/core.janet b/src/jolt/core.janet index 28bfff3..8d1815b 100644 --- a/src/jolt/core.janet +++ b/src/jolt/core.janet @@ -86,16 +86,12 @@ (while (and ok (< i (dec (length args)))) (let [a (args i) b (args (+ i 1))] (set ok - (if (and (tuple? a) (array? b)) - (deep= a (tuple/slice (tuple ;b))) - (if (and (array? a) (tuple? b)) - (deep= (tuple/slice (tuple ;a)) b) - (if (phm? a) - (deep= (phm-to-struct a) (if (phm? b) (phm-to-struct b) b)) - (if (phm? b) (deep= a (phm-to-struct b)) - (if (set? a) - (deep= (phs-to-struct a) (if (set? b) (phs-to-struct b) b)) - (if (set? b) (deep= a (phs-to-struct b)) (deep= a b)))))))) + (if (phm? a) + (deep= (phm-to-struct a) (if (phm? b) (phm-to-struct b) b)) + (if (phm? b) (deep= a (phm-to-struct b)) + (if (set? a) + (deep= (phs-to-struct a) (if (set? b) (phs-to-struct b) b)) + (if (set? b) (deep= a (phs-to-struct b)) (deep= a b))))))) (++ i)) ok))) @@ -627,8 +623,7 @@ (var first? true) (each x xs (if first? (set first? false) (buffer/push buf " ")) - (cond - (nil? x) (buffer/push buf "nil") + (if (nil? x) (buffer/push buf "nil") (= true x) (buffer/push buf "true") (= false x) (buffer/push buf "false") (keyword? x) (do (buffer/push buf ":") (buffer/push buf (string x)))