Hi Maxim! Do you know of any simple example anywhere for applicable structs? I might have another use for them.
Regards, Zelphir On 9/18/21 4:47 PM, Maxime Devos wrote: > Justin Veilleux schreef op vr 17-09-2021 om 18:50 [-0400]: >> It works relatively well. However, I also wanted it to print a human >> readable version of the procedures created. (It is hard to tell whether >> #<procedure 1e39a38 (s)> is a correct church encoding of the number 3) >> With a lot of fiddling, I managed to write a function that turns a >> procedure into an S-expression. > The #:printer is only used by things like "guild compile -o ..." I think. > > One option is to create ‘applicable structs’ (unfortunately they aren't > documented), setting the procedure to the actual procedure, and the record > printer (set-record-type-printer!) to something printing the S-exp of the > applicable struct. > > Greetings, > Maxime -- repositories: https://notabug.org/ZelphirKaltstahl