well-typed course ch6 examp to probs