On Thursday, December 10, 2015 at 7:15:07 PM UTC+1, Jonathan Brachthäuser wrote: > In DrRacket 6.2.1 when using the `match` construct as defined in the > abstraction teachpack together with posn a strange problem appears. > > When choosing BSL as language the following code just works as expected: > > ``` > (require 2htdp/abstraction) > (match (make-posn 1 2) [(posn x y) (+ x y)]) > ``` > > yields `3`. > > However when choosing "BSL with list abbreviation" the above code gives: > > ``` > ... (posn x y) ... > function call: expected a function after the open parenthesis, but found a > part > ``` > > We can work around the error by using `my-posn` instead (defined below) > > ``` > (define-struct my-posn (x y)) > ``` > > Is there any explanation why this happens? Is the abstraction teachpack not > designed to work with "BSL with list abbrv" ?
The issue is a missing export in BSL+. Last time this came up, I submitted a pull request which is still open, so I suspect this isn't fixed yet: https://github.com/racket/htdp/pull/16. Apparently I only made a pull request and didn't open a thread on this ML, which might be part of the problem. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

