Yes, the problem here is that plain names in `match` are bindings, not
comparisons to things in the environment. So if you replace `_float`
with `empty` or `string=?` it will still produce the same answer.

If you want to compare with something in a `match` pattern, you might
want `==`: 
https://docs.racket-lang.org/reference/match.html?q=%3D%3D#%28form._%28%28lib._racket%2Fmatch..rkt%29._~3d~3d%29%29

Sam

On Sun, Jul 14, 2019 at 4:28 PM Peter Samarin <peter.sama...@gmail.com> wrote:
>
> Hi all,
>
> Is this behavior expected?
>
> (require racket/main
>             ffi/unsafe)
>
> (for/list ([type (list _float _double _int)])
>   (match type
>     [_float 'float]
>     [_double 'double]
>     [_int 'int]))
>
> > '(float float float)
>
> I was expecting '(float double int)
>
> --Peter
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to racket-dev@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-dev/de7284e8-e6ec-4681-9110-6cb1756e8276%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-dev@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/CAK%3DHD%2BbqKbnGnshL1wCTTr6DgTp7UPK5GjfszGjpp%2BrpXBdb1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to