Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d68221fdcc
Fetching contributors…

Cannot retrieve contributors at this time

file 14 lines (11 sloc) 0.309 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
(ns kibit.rules.collections
  (:use [kibit.rules.util :only [defrules]]))

(defrules rules
  ;;vector
  [(conj [] . ?x) (vector . ?x)]
  [(into [] ?coll) (vec ?coll)]

  ;; empty?
  [(not (empty? ?x)) (seq ?x)]
  [(when-not (empty? ?x) . ?y) (when (seq ?x) . ?y)]

  ;; set
  [(into #{} ?coll) (set ?coll)])
Something went wrong with that request. Please try again.