Never mind! Write this off to my forgetful old age. This one is supposed to work for BSL and BSL+. I had forgotten that I fixed this.
(There are other parts of 2htdp/abstraction that work only when functions are available as values.) On Dec 10, 2015, at 5:56 PM, Matthias Felleisen <[email protected]> wrote: > > On Dec 10, 2015, at 1:15 PM, Jonathan Brachthäuser <[email protected]> > 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" ? > > > No, 2htdp/abstraction is designed to work with ISL and ISL+. The above > problem is precisely why it doesn't work in BSL and BSL+. (There is a second > problem, which escapes me right now.) > > -- > 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. -- 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.

