;;; clj-lib.el -*- lexical-binding: t; -*-

(require 'dash)

(defmacro clj-condp (pred expr &rest clauses)
  "TODO: Very unfinished."
  (declare (indent defun))
  (unless (symbolp pred)
    (signal 'wrong-type-argument `(symbolp ,pred)))
  (let ((expr* (gensym "expr")))
    `(let ((,expr* ,expr))
       (cond ,@(mapcar (lambda (x) `((,pred ,expr ,(car x)) ,(nth 1 x)))
                       clauses)))))

(provide 'clj-lib)
