This is a pretty silly mistake that I was making, but it was really confusing me for a minute. I was forgetting to wrap the arguments and function body within a set of parens when using multi-arity functions in ClojureScript. Let me know you what I mean.
The shorthand syntax for an anonymous function in Clojure can be a bit confusing (at least it was for me when I first saw it!). In this post I'll go over what it is and show that it's actually not all that scary.
For someone new To Clojure and ClojureScript it can seem like a bit of a "gotcha" to know when you need to use the apply function and when you don't. Hopefully in this post I'll clear up any confusion about how to apply apply! Let's lay the foundation for this discussion by looking first at some simple examples.
Once again I'm saved by friends in the Clojurians slack channel! This time it was viebel who answered my question in the klipse room. I really love the simplicity and ease of app.klipse.tech because it gives you an instant Clojurescript scratchpad at your fingertips. My only issue was that I didn't know how to add other ClojureScript libraries. Viebel opened my eyes to the fact that it's actually incredicibly easy to add other Clojurescript libraries, and here's how you do it!
Today is Thanksgiving, and as we close out 2017 currently especially thankful for all of these great programming languages and tools that have been created and shared. It is really incredible that anyone with (admin) access to a computer can get started with any programming language literally right now. It's just a google away. ;) Anyway, since you've come to this post I'll assume you're interested in using ClojureScript, and I won't have to bore you with how amazingly awesome and mind-expanding learning ClojureScript is because of how data-focused and simple your code becomes without the overhead of modern OOP imperative syntax. So, hold onto your keyboards because in this post I'll show you that it's not hard at all to get started with ClojureScript!
The posts on this site are written and maintained by Jim Lynch. About Jim...