Arc Forumnew | comments | leaders | submitlogin
1 point by rntz 6113 days ago | link | parent

This isn't a fundamental difference. Just as 'annotate could as easily create a new doubly-wrapped object, 'annotate-cons can as easily not cons when the type is the same.

    (def annotate-cons (typ val)
      (if (isa val typ) val (cons typ val)))