File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 33 (:refer-clojure :exclude [group-by])
44 (:require [clojure.core :as cc]))
55
6+ (defmacro implies
7+ " `(implies x y)` expands to `(or (not x) y)` while being more
8+ descriptive of the logical intent."
9+ [x y]
10+ `(or (not ~x) ~y))
11+
612(defn seq-indexed
713 " Returns an indexed sequence from the collection `coll`."
814 [coll]
Original file line number Diff line number Diff line change 22 (:require [clojure.test :refer [deftest testing is are]]
33 [mate.core :as m]))
44
5+ (deftest implies-test
6+ (is (true ? (m/implies true true )))
7+ (is (false ? (m/implies true false )))
8+ (is (true ? (m/implies false true )))
9+ (is (true ? (m/implies false false ))))
10+
511(deftest seq-index-test
612 (is (= (m/seq-indexed [:a :a :b :a :b ])
713 '([0 :a ] [1 :a ] [2 :b ] [3 :a ] [4 :b ]))))
You can’t perform that action at this time.
0 commit comments