This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-07
Channels
- # beginners (153)
- # cider (2)
- # cljs-dev (1)
- # cljsjs (11)
- # cljsrn (4)
- # clojure (21)
- # clojure-austin (2)
- # clojure-greece (1)
- # clojure-italy (8)
- # clojure-russia (12)
- # clojure-spec (68)
- # clojurescript (35)
- # cursive (4)
- # datomic (2)
- # fulcro (15)
- # off-topic (1)
- # om (1)
- # portkey (35)
- # protorepl (6)
- # re-frame (28)
- # shadow-cljs (13)
- # specter (10)
- # uncomplicate (3)
- # unrepl (7)
So I'm trying to create an IFn from a java Runnable in java code (using clojure.java.api.Clojure
for interop). What's the best way to do this? Using Clojure.read
can't create an annonymous functions, and I'm not sure how to create an annonymous function with Clojure.var
Right. That's a lot of overrides to do. Just wanted to make sure that this wasn't handled in the api.
AFn has default implementations for the whole IFn interface, just override the ones you need
Hi, how to use cemerick/friend and ring anti forgery tokens together? I get a failed login when adding forgery token field
Am I wrong to assume seq will realize a lazy sequence? I thought converting it to a non lazy sequence would fore realize it
seq does not realize a lazy-seq
+user=> (type (seq (map inc (range))))
clojure.lang.Cons
+user=> (type (rest (seq (map inc (range)))))
clojure.lang.LazySeq
it only makes the outermost element non-lazy
it replaces the first pair of the linked list with a ChunkedCons which is a kind of cons pair
if the input were chunked a whole "chunk size" elements would have been realized
but it doesn't realize the whole thing - after the first pair / pairs the rest is still a lazy-seq
Okay, that's a bit strange. I guess its because it reads the head, and then the tail just points to the rest of lazy-seq?
yes, that's exactly it