4 ms·
Clojure isn't even a Lisp, it is a bunch of misconceptions with lisp-like syntax.) Attempt to make so-called lisp by breaking code-is-data concept, or trying t
by dschiptsov 14y ago
Clojure isn't even a Lisp, it is a bunch of misconceptions with lisp-like syntax.)
Attempt to make so-called lisp by breaking code-is-data concept, or trying to use some yaml-like notation instead of s-expression with annotations (to describe a representation where we need only a structure), without proper recursion is something as far from Lisp as, say, Python.
there is more - http://karma-engineering.com/lab/blog http://karma-engineering.com/lab/blog
- dschiptsov 14y agothere is what I mean: this is idiomatic Lisp: (define (keep pred l) (cond ((null? l) '()) ((pred (car l)) (cons (car l) (keep pred (cdr l)))) (else (keep pred (cdr l))))) this is nonsense: (defn keep "Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f must be free of side-effects." {:added "1.2" :static true} ([f coll] (lazy-seq (when-let [s (seq coll)] (if (chunked-seq? s) (let [c (chunk-first s) size (count c) b (chunk-buffer size)] (dotimes [i size] (let [x (f (.nth c i))] (when-not (nil? x) (chunk-append b x)))) (chunk-cons (chunk b) (keep f (chunk-rest s)))) (let [x (f (first s))] (if (nil? x) (keep f (rest s)) (cons x (keep f (rest s)))))))))) When one breaks the underlying ideas he ruins the spell..