Closed leek5pin closed 9 years ago
The message there should be something like "% must be either on its own or followed by a number or &".
A note: (#(+ %1.99 1) 5)
works, 1.99 rounds down to 1. Thus saying "an integer" is actually too restrictive. However, (#(+ %0.99 1) 5)
rounds down to zero and gives a weird error (from tryclojure):
java.lang.RuntimeException: Unable to resolve symbol: p0__8999# in this context
Putting a negative number gives an even stranger error.
I don't think we need to worry about the zero case and the negative case.
I was able to fix the wording on it, by adding it into error_dictionary, but I can't get my test for the new wording to pass. If I push, can you take a look at it?
Sure. You will probably need to pull first since I refactored the way hints are handled which affected multiple files.
I had some trouble pushing, and I think it just worked, but you should take a look at it.
Ok, will do in a few minutes.
On Tue, Jun 23, 2015 at 1:30 PM, Sean Stockholm notifications@github.com wrote:
I had some trouble pushing, and I think it just worked, but you should take a look at it.
— Reply to this email directly or view it on GitHub https://github.com/Clojure-Intro-Course/clojure-intro-class/issues/50#issuecomment-114600843 .
Dr. Elena Machkasova Associate Professor of Computer Science Division of Science and Mathematics University of Minnesota, Morris Office: Sci 2325 (320) 589-6308 http://cda.morris.umn.edu/~elenam/
Done. You can pull now. The issue is that it's a parsing error, and so it's like a compilation error: the code fragment can't be parsed, so it's not even running, and the exception is thrown directly to the top level. I fixed it by moving the testing code into a separate file.
Is this issue finished?
(map #(+ %a 1) [1 2 3]) Error: arg literal must be %, %& or %integer Found in file may2015.clj on line 18 at character 12. intro.core/-main (core.clj line 114)
java.lang.IllegalStateException