Changes between Version 13 and Version 14 of Tutorial1


Ignore:
Timestamp:
Nov 15, 2012, 1:05:14 PM (7 years ago)
Author:
schiptsov
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial1

    v13 v14  
    1414(define (member x l)
    1515  (cond ((null? l) #f)                 ; if it is an empty list, then it has no memebers
    16         ((eq? x (car l)) #t)           ; if the first element the list is equal to a given integer
    17         (else (member x (cdr l)))))    ; otherwise lets skip the first element and check the remaining sub-list
     16        ((eq? x (car l)) #t)           ; if the given number is equal to the first element the list
     17        (else (member x (cdr l)))))    ; otherwise skip the first element and check the remaining sub-list
    1818
    1919; Now let's do some testing - whether or not this code works as expected.