1.2.3-SNAPSHOT Arrow_down_16x16
  • (defop op prec & [trans])
Define operators for formula macro

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/infix.clj:42 top

(defn defop
  "Define operators for formula macro"
  ([op prec & [trans]]
     (dosync (ref-set +precedence-table+ (assoc @+precedence-table+ op prec)))
     (when-not (nil? trans)
       (dosync (ref-set +translation-table+ (assoc @+translation-table+ op trans))))
     (dosync (ref-set +highest-precedence+ (apply max (map val @+precedence-table+))))))
Vars in incanter.infix/defop: apply assoc defn dosync map max nil? ref-set val when-not deref
Used in 0 other vars

Comments top

No comments for defop. Log in to add a comment.