code: def DecisionListLearner(dataset):
      
  
      def decision_list_learning(examples):
          if not examples:
              return [(True, False)]
          t, o, examples_t = find_examples(examples)
          if not t:
              raise Failure
          return [(t, o)] + decision_list_learning(examples - examples_t)
  
      def find_examples(examples):
          """Find a set of examples that all have the same outcome under
          some test. Return a tuple of the test, outcome, and examples."""
          unimplemented()
  
      def passes(example, test):
          "Does the example pass the test?"
          unimplemented()
  
      def predict(example):
          "Predict the outcome for the first passing test."
          for test, outcome in predict.decision_list:
              if passes(example, test):
                  return outcome
      predict.decision_list = decision_list_learning(set(dataset.examples))
  
      return predict
docs: [Fig. 18.11]