Lazier than lazy
If you can’t put off what you have to do, ask someone else to do it for you.
(defn off
"Computes a lazy-seq in another (dedicated) thread."
[s]
(let [ex (. java.util.concurrent.Executors newSingleThreadExecutor)]
((fn this [s]
(if s
(let [future-rest (java.util.concurrent.FutureTask. #(rest s))]
(.execute ex future-rest)
(lazy-cons (first s) (this (.get future-rest))))
(.shutdown ex))) s)))
a similar case as the Daechi-dong incident
The Korea Herald is running a series of
evolution and rise of drug crimes
Free drinks were offered last week
on the streets of Daechi-dong
a district in Seoul’s Gangnam lined with
thousands of after-school cram
schools and known as South
Korea’s private education mecca
In exchange for the free drinks, the
people handing them out allegedly asked high
schoolers for their parents’ contact information
according to the police. These
people later demanded some 100