Re: [racket-users] Is there a predicate for structs in general?

2017-12-09 Thread David Storrs
Ah. Yes, that makes more sense. Thanks. On Sat, Dec 9, 2017 at 3:32 PM, Robby Findler wrote: > One hopefully helpful piece of information is that _all_ values in Racket > are structs. So this predicate is telling you that this kind of value is > revealing its inherent "structness" to you or not

Re: [racket-users] Is there a predicate for structs in general?

2017-12-09 Thread Robby Findler
One hopefully helpful piece of information is that _all_ values in Racket are structs. So this predicate is telling you that this kind of value is revealing its inherent "structness" to you or not. In this case, the struct isn't transparent so it isn't revealing it. (Just like cons pairs don't rev

[racket-users] Is there a predicate for structs in general?

2017-12-09 Thread David Storrs
(struct fruit (name color)) -> (struct? (fruit 'apple 'red)) #f This surprised me. I'm trying to wrap my head around the docs for struct? and struct-info? and not having a lot of success. Is there a way to simply say "is this a struct of some sort?" Context: I'm playing around with structs th