<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">It doesn’t have to be a struct, but the problem is that typed racket doesn’t know that a value of type String for instance will be of type JSExpr or not, so you would have to put (assert x jsexpr?) around everything that you want to treat as a jsexpr.</div></div></blockquote></div><br class=""><div class="">Ah, that’s interesting. I’d seen assert when digging through the docs, but I didn’t quite realize how it worked at the time. Looking back at it again, I’m surprised I missed it, but no matter.</div><div class=""><br class=""></div><div class="">That <i class="">does</i> solve the problem, albeit rather inelegantly. I’d be interested to see if there’s another way, but I would understand why it would be difficult to implement a cleaner approach.</div></body></html>