Clojure-Intro-Course / clojure-intro-class

NOTE: This repository is obsolete. Was: A pilot project to use Clojure for introductory computer science courses at the University of Minnesota - Morris
20 stars 3 forks source link

add asserts for merge #59

Open elenam opened 9 years ago

elenam commented 9 years ago

Uses of merge with something other than a vector or a map as the second argument give a really confusing (our) error: (merge {:a 1 :b 2 :c 3} '(5 6 7 8)) Gives an error Error: Attempted to create a map using a number, but a sequence of vectors of length 2 or a sequence of maps is needed.

Note: check if nil is allowed as the first or the second argument.

elenam commented 9 years ago

Note: this is a merge on hashmaps.