# Type matching in typed Racket

**URL:** <https://racket.discourse.group/t/type-matching-in-typed-racket/3941>\
**Category:** Questions & Answers\
**Created:** [September 16, 2025, 4:38pm UTC](https://racket.discourse.group/t/type-matching-in-typed-racket/3941 "2025-09-16T16:38:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hendrikboom3](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/hendrikboom3/32/2748_2.png) [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Post date:** [September 16, 2025, 4:38pm UTC](https://racket.discourse.group/t/type-matching-in-typed-racket/3941/1 "2025-09-16T16:38:55Z")

</div>

Trying to use match in type Racket, I wonder if there is a match pattern that can test the type of a value?  
If I have define a type Frummich, is there a math pattern I can use to tell whether value being matched is in fact a valueof type Frummich?

---

<div class="post-metadata">

**Author:** ![shawnw](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/shawnw/32/1031_2.png) [@shawnw](https://racket.discourse.group/u/shawnw)\
**Post date:** [September 16, 2025, 8:18pm UTC](https://racket.discourse.group/t/type-matching-in-typed-racket/3941/2 "2025-09-16T20:18:56Z")

</div>

Racket and Scheme don't have a way to ask a value what type it is (unlike Common Lisp), just allowing asking if a value is of a specific type via an appropriate predicate function. So if you have a `frummich?` function you can branch off of it (See the Typed Racket Guide entry on [propositions and predicates](https://docs.racket-lang.org/ts-guide/occurrence-typing.html#%28part._propositions-and-predicates%29) for how to write ones that interact with the TR type system):

```scheme
(match foo
 [(? frummich? frum) ...]
 ; etc
)

```
