Tag: clojure
Introducing BackTick, a.k.a. StanScript ; ) a Clojure/Scala/Lisp/Python-inspired JavaScript superset
Why `backtick`? Because (almost) all of the syntax extensions were introduced using only one character. Yep, you got it – the backtick ; ) Supported features: – Python-like operator overloading (by defining __iadd__, __eq__, etc. methods in the object or prototype), e.g.: x.__iadd__ = function(y) { this.data += y; }; […]
Numerical string sorting in Clojure
Time for a bit of functional programming nostalgia. As Wikipedia mentions – http://en.wikipedia.org/wiki/Collation#Issues_with_numbers and hundreds of posts from interested people all over the Internet confirm – it is sometimes useful to have strings sorted using their numerical components. The simple algorithm below handles this task as it seems most reasonable […]
Recent Comments