Fork me on GitHub
#specter
<
2017-05-07
>
nha16:05:23

Could this selector be rewritten to avoid sp/range or sp/LAST?

(def data
  [[:foo {:component "aaa"}]
   [:bar {:component "bbb"}]
   [:qux {:component "ccc"}]])

(= (sp/select [sp/ALL
               (sp/srange 1 2)
               sp/ALL
               :component
               ] data)

   (sp/select [sp/ALL
               sp/LAST
               :component
               ] data)) ;; => true
Is there something analog to sp/SECOND or sp/NTH ?

nha19:05:22

Perfect, I missed this one 🙂 Thanks nathanmarz, always helpful!