You would want (== eof), because 'eof' is just an identifier, so
you're binding x to eof.

Jay

On Wed, Apr 6, 2016 at 12:05 PM, rom cgb <romainbeck...@gmail.com> wrote:
> On Monday, April 4, 2016 at 10:44:46 PM UTC+2, Alex Knauth wrote:
>> I'm convinced that implicit quotes are the root of almost all evil in lisp 
>> programming languages. That's a big reason why I like the teaching languages 
>> better in terms of things making sense.
>>
>> It's also why I normally use `match` instead of `case` even when I *am* 
>> dealing with integers or symbols.
>
> How to use eof with match ?
>
> For example, with
>
>     (define (test x)
>         (match x [1   "one"]
>                  [2   "two"]
>                  [eof "eof"]
>                  [3   "three"]))
>
> Why (test 3) evaluates to "eof", not "three" ?
>



-- 
Jay McCarthy
Associate Professor
PLT @ CS @ UMass Lowell
http://jeapostrophe.github.io

           "Wherefore, be not weary in well-doing,
      for ye are laying the foundation of a great work.
And out of small things proceedeth that which is great."
                          - D&C 64:33

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to