Don't def inside functions. Def creates a global var. You should avoid side-effects inside a function. State should be managed using atoms, refs or agents.
I recommend you start with smaller pieces. Try getting one function working at at time. You will progress faster and if you need to ask for help, it will be clearer what you are stuck on. Also look at the full stack trace, it will tell you where exactly the problem is occurring.
Asked in February 2016Viewed 1,173 timesVoted 4Answered 1 times