A real-world problem

Mailing lists -

 

Build a model for solving this problem.

 

Mailing List Database -

an "association list":

 [

  [ list_name1 | list of people on 1 ],

  [ list_name2 | list of people on 2 ],

        :

        :

  [ list_nameN | list of people on N ]

 ]

 

Example

 [

  ["cs-majors", "mary", "john", "tom", º ],

  ["math-majors", "alice", "tom", º ],

  ["class of 99", "mary", "tom", º ],

   :

   :

 ]

Sending to "cs-majors"

     and "class of 99"

should result in only one message to "mary" and "tom".

 

Functional View

select(lists,db) returns list of recipients

How to build select? (out of other functions)

 

Possible Approach -

 

Code development: See

 

Enhancements to Functionality

A.  Allow the 'lists' argument to 'select' to contain individuals as well as list names.

Code development: See

B.  Allow lists in db to contain names of lists as well as names of individuals.

Code development: See

 

To Next Slide To Previous Slide To Contents