;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname list-abbreviations) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) ; A ListOfStrings is one of: ; - empty ; - (cons String ListOfStrings) ; empty : ListOfStrings ; cons : String ListOfStrings -> ListOfStrings ; list : -> ListOfStrings ; list : String -> ListOfStrings ; list : String String -> ListOfStrings ; list : String String String -> ListOfStrings ; list : String String String String -> ListOfStrings ; (list A B C D) = (cons A (cons B (cons C (cons D empty)))) ; (list A B C) = (cons A (cons B (cons C empty))) ; (list A B) = (cons A (cons B empty)) ; (list A) = (cons A empty) ; (list) = empty ; Examples of a ListOfStrings: empty (cons "banana" empty) (cons "pear" (cons "banana" empty)) (cons "kiwi" (cons "pear" (cons "banana" empty))) (cons "papaya" (cons "kiwi" (cons "pear" (cons "banana" empty))))