Controlling how a type instance appears in the REPL
36 views
Skip to first unread message
Outrovurt #
unread,
Apr 24, 2020, 11:41:25 PM4/24/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ClojureScript
If I create a type like this
(deftype MyType[x]...)
is there any way I can control what is displayed at the REPL when I create a new instance of MyType?
At present all I see is:
cljs.user=>(MyType.1) #object[cljs.user.MyType]
It's this "#object[cljs.user.MyType]" which I'd like to customise. I've checked so much of the documentation and can't find anything which might let me display something else.
Thanks.
Outrovurt #
unread,
Apr 27, 2020, 6:55:45 AM4/27/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ClojureScript
Joy of joys, I found it completely by accident while looking for something completely different in this excellent online ClojureScript book: