raoul.schorer
2021-11-20 12:14:12

Hi, I know that racket has an ‘object’ for representing non-existent values (other than #f or (void), more something like ‘nothing’) in some lib. Unfortunately, I can’t remember where I found it in the docs! Does anybody know the name or where I can find it?


soegaard2
2021-11-20 12:15:38

Maybe undefined


soegaard2
2021-11-20 12:16:22

But it’s meant for representing that a variable is not yet initialized.


raoul.schorer
2021-11-20 12:16:37

that’s it! Thanks!


raoul.schorer
2021-11-20 12:16:53

Hmm. Ok, so not really what I’m looking for


raoul.schorer
2021-11-20 12:17:55

Essentially, I was hoping to have something similar to NA in R, such that I could still have #f and #t to make boolean vectors with missing values


soegaard2
2021-11-20 12:19:20

I would simply use (struct NA ()) and then only create one instance.


soegaard2
2021-11-20 12:20:16

If you need it, there are some struct properties that can be used to change the way the value is printed.


raoul.schorer
2021-11-20 12:23:25

I had not thought about that, but it seems like a great idea. Thanks again!