[racket] member et al.

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Nov 11 10:59:49 EST 2010

On Nov 11, 2010, at 10:50 AM, Nadeem Abdul Hamid wrote:

> Yes, but this is weird in the opposite way:
> 
> Welcome to DrRacket, version 5.0.2 [3m].
> Language: Beginning Student; memory limit: 128 MB.
>> (member? 1 (list 2 3 4 1))
> true
>> (member 1 (list 2 3 4 1))
> true

That's a 'bug'. 


>> 
> 
> 
> On Thu, Nov 11, 2010 at 10:36 AM, Matthias Felleisen
> <matthias at ccs.neu.edu> wrote:
>> 
>> Welcome to DrRacket, version 5.0.99.2--2010-11-11(686ec83/g) [3m].
>> Language: Beginning Student.
>>> (member? 1 (list 2 3 4 1))
>> true
>> 
>> 
>> 
>> On Nov 11, 2010, at 10:32 AM, Shriram Krishnamurthi wrote:
>> 
>> In fact, I proposed adding the ? forms of these functions where the new ones
>> are strictly boolean.
>> 
>> These are essential for the SLs since the standard versions are useless due
>> to the true/false tests in the language.
>> 
>> On Nov 11, 2010 6:44 AM, "Jay McCarthy" <jay.mccarthy at gmail.com> wrote:
>> 
>> I agree with Mark. I often write ? versions of functions like member
>> in my code when I write it the first time to show the "predicate
>> intent".
>> 
>> Another important case is when you don't want internal values to
>> "escape" to the client because you forget that member/and/etc return
>> the thing, not #t.
>> 
>> Jay
>> 
>> On Thu, Nov 11, 2010 at 6:07 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu>
>> wrote:
>>> On Thu, Nov 11, 2...
>> 
>> --
>> Jay McCarthy <jay at cs.byu.edu>
>> Assistant Professor / Brigham Young University
>> http://faculty.cs.byu.edu/~jay
>> 
>> "The glory of God is Intelligence" - D&C 93
>> 
>> _________________________________________________
>> For list-related administrative tasks:
>> http://...
>> 
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users
>> 
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users
>> 
> 
> 
> 
> -- 
> Nadeem Abdul Hamid
> Associate Professor, Computer Science
> Berry College
> PO Box 5014
> 2277 Martha Berry Hwy NW
> Mount Berry, GA 30149-5014
> (706) 368-5632
> http://cs.berry.edu/~nhamid/



Posted on the users mailing list.