/ Published in: Clojure

Short yet highly configurable. Great to show off Clojure.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
(defpartial display-field [value & {:keys [label message layout]} {:or {message "Not Available" layout #(vector (:p [:strong %1] %2))}} {:pre [(not (and (blank? label) (blank? message)))]}] (when message (layout label (first (remove blank? (value message))))))
Comments
