Clojure stub generator

Hello, I have submitted a puzzle and got some feedback that the default Clojure code throws an exception.

It seems the code generated from statements such as “read C:int” do not consume the end of line, so the next call to “read-line” returns an empty string and ends up shifting inputs.

I have answered the message in and enclosed a code sample to workaround the problem. Is there a way for me to fix the template? Or is it a bug in the Clojure code generator?

Seems related to Default Clojure template code for A*Craft does not work.


Will look into it

I can confirm there is an issue, in the puzzle I approved earlier the following stub generator worked for every language except Clojure :
read n:int
loop n read line:word(50)
write name

The second line had to be replaced with “loop n read line:string(50)” to fix it.

We’ve fixed the Clojure code generator. Thanks for reporting the issue!