~statianzo/sevenlangs

3e7228a57fcce2712e47ba571687e7389d470998 — Jason Staten 2 years ago cb5b4ba
clojure
M clojure/deps.edn => clojure/deps.edn +18 -1
@@ 1,1 1,18 @@
{:deps {}}
\ No newline at end of file
{
 :deps {}


 
 :aliases {:nREPL
           {:extra-deps
           {nrepl/nrepl {:mvn/version "0.7.0"}}}

           :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.22.4"}}
             :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}

           :test {:extra-paths ["test"]
                   :extra-deps {com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner.git"
                                                           :sha "f7ef16dc3b8332b0d77bc0274578ad5270fbfedd"}}
                   :main-opts ["-m" "cognitect.test-runner"]}}

 }

M clojure/src/one/core.clj => clojure/src/one/core.clj +4 -4
@@ 30,7 30,7 @@
  WhatType
  (what-type [w] :set))

; (extend-type
;  clojure.lang/List
;   WhatType
;   (what-type [w] :list))
\ No newline at end of file
 (extend-type
  clojure.lang.PersistentList
   WhatType
   (what-type [w] :list))

A clojure/test/one/core_test.clj => clojure/test/one/core_test.clj +18 -0
@@ 0,0 1,18 @@
(ns one.core-test
  (:use clojure.test)
  (:require [one.core :refer :all]))

(deftest bigger
  (is (= true (big "foo" 2))))

(deftest smaller
  (is (= false (big "small" 10))))

(deftest vector-type
  (is (= :vector (collection-type [1 2 3]))))

(deftest list-type
  (is (= :list (collection-type '( 1 2 3)))))

(deftest what-list
  (is (= :list (what-type '( 1 2 3)))))

A clojure/test/two/core_test.clj => clojure/test/two/core_test.clj +10 -0
@@ 0,0 1,10 @@
(ns two.core-test
  (:use clojure.test)
  (:require [two.core :refer :all]))


(deftest first-fib
  (is (= 1 (first fibs))))
(deftest first-fib
  (is (= '(1 2 3 5 8) (take 5 fibs))))