News for hackers. Stuff that matters.
Re:The Roots of Lisp (2001) by LandR on Thursday January 16, 2020 @09:32AM (#22064826)
Nesting can be sorted via macros, e.g. closures threading macros

    (defn unique [str]
       (->> (str/split str #"\s+")
            (map #(Integer/parseInt %))
            (partition-by even?)
            (take-while #(not= (count %) 1))
            (first)
            (count)
            (inc)))

  (unique "2 4 6 8 7 10 12")
   => 5

There are no comments on this comment yet.