On this page:
canonical-copy

2.5 hashcons🔗

 (require sicm/general/hashcons) package: rktsicm

procedure

(canonical-copy expression)  any/c

  expression : any/c
Given an expression, canonical-copy will create a copy that will always be eq? to any other canonical-copy of an expression that has the same structure (created from conses and eqv? objects).

Example:
> (eq? (canonical-copy (list 'define 'x 4))
       (canonical-copy (list 'define 'x 4)))

#t