[racket] List abbreviations in Beginning Student

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Jun 30 10:39:26 EDT 2010

On Jun 30, 2010, at 5:44 AM, Horace Dynamite wrote:

> Hi Barry,
>> I noticed that beginning students are able to use list abbreviation  
>> constructors. It doesn't return the list in abbreviated form,  
>> however.
>> (list 1 2 3)
>> returns
>> (cons 1 (cons 2 (cons 3 empty)))
>> Is that correct?

Yes. It accommodates people who use the Little books with the teaching  
languages. (I used to have a language collection for TLL/S, but I  
failed to maintain it.) Also see (define f (lambda (x) x)).

> I've noticed some overlaps of functionality between the teaching
> languages myself too. I remember using this feature when I first
> encountered the list abbreviations though, since for a while I wasn't
> confident what a nested (list ... (list ...)) might look like in the
> cons form.
> As a side note, a lot of people have trouble with the arrangements
> exercise in section 12, which is a little cleaner to work with using
> list abbreviations, so thats another possible reason for including
> this functionality in the beginning student language.

I am in the process of working this extended exercise into HtDP/2e  
AFTER introducing (list "h" "e" "l" "l").

-- Matthias

Posted on the users mailing list.