Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 7e2314adb1
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (12 sloc) 0.574 kB
(ns iterate-clojure-workshop12.task15-let
(:require [clojure.test :refer :all]))
;; ### TASK A ###
;; Refactor the company-finder from task8-functions.clj to be more
;; readable by assigning the map and the individual the individual
;; subexpressions (streets, companies) to local constants with let
; TODO
;; Test for the function
(deftest company-finder-test
(is (= "Iterate" (company-finder "Bygdøy allé" 0 "New Oslo")))
(is (= "ComoYo" (company-finder "Bygdøy allé" 1 "New Oslo")))
(is (= "Peppes Pizza" (company-finder "Bygdøy allé" 2 "New Oslo"))))
Jump to Line
Something went wrong with that request. Please try again.