mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-11 04:27:55 +03:00
commit
e741d59ce3
@ -28,6 +28,9 @@
|
||||
(break))))
|
||||
eq)))
|
||||
|
||||
(defn /= [a b]
|
||||
(not (= a b)))
|
||||
|
||||
(doc maximum "Get the maximum in an array (elements must support <).")
|
||||
(defn maximum [xs]
|
||||
(let [result (first xs)
|
||||
|
File diff suppressed because one or more lines are too long
@ -22,13 +22,19 @@
|
||||
(with-test test
|
||||
(assert-true test
|
||||
(= &[1 2 3] &[1 2 3])
|
||||
"= works as expected")
|
||||
"= works as expected I")
|
||||
(assert-false test
|
||||
(= &[1 2 3] &[1 2 3 4])
|
||||
"= works as expected")
|
||||
"= works as expected II")
|
||||
(assert-false test
|
||||
(= &[1 2 3] &[1 2 34])
|
||||
"= works as expected")
|
||||
"= works as expected III")
|
||||
(assert-true test
|
||||
(/= &[1 2 3] &[1 2 3 4])
|
||||
"/= works as expected I")
|
||||
(assert-true test
|
||||
(/= &[1 2 4] &[1 2 3])
|
||||
"/= works as expected II")
|
||||
(assert-equal test
|
||||
&[0 0 0 0]
|
||||
&(replicate 4 &0)
|
||||
|
Loading…
Reference in New Issue
Block a user