design/6977-overlapping-interfaces.md: add another example

Per https://github.com/golang/go/issues/6977#issuecomment-507887653,
add an appendix for more examples and start with one more example.

Updates golang/go#6977.

Change-Id: I63625b56b7eb251423633f898d7bd974503b184d
Reviewed-on: https://go-review.googlesource.com/c/proposal/+/188197
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/design/6977-overlapping-interfaces.md b/design/6977-overlapping-interfaces.md
index 5074ac0..fd33bac 100644
--- a/design/6977-overlapping-interfaces.md
+++ b/design/6977-overlapping-interfaces.md
@@ -2,7 +2,7 @@
 
 Author: Robert Griesemer
 
-Last update: 2019-06-11
+Last update: 2019-07-30
 
 Discussion at [golang.org/issue/6977](https://golang.org/issue/6977).
 
@@ -101,3 +101,40 @@
 As noted in our [“Go 2, here we come!” blog post](https://blog.golang.org/go2-here-we-come), the development cycle will serve as a way to collect experience about these new features and feedback from (very) early adopters.
 
 At the release freeze, November 1, we will revisit this proposed feature and decide whether to include it in Go 1.14.
+
+## Apendix: More examples
+
+Starlark is a Python dialect implemented in Go. The base `starlark.Value` interface defines a set of methods that every value must implement, such as `String`, `Type`, and `Truth`, but additional interfaces define optional facets of a type. For example, a value `x` that satisfies the `Iterable` interface may be used in a `for y in x` statement, a value that satisfies `HasFields` may be used in a `x.field` expression, and a value that satisfies `Mapping` may be used in a variadic call `f(**x)`. ([Example from #6977.](https://github.com/golang/go/issues/6977#issuecomment-450440293))
+
+```Go
+package starlark
+
+type Value interface {
+    String() string
+    Type() string
+    Truth() bool
+    ...
+}
+
+type Mapping interface {
+    Value
+    Get(key Value) Value
+}
+
+type Iterable interface{
+     Value
+     Iterate() Iterator
+}
+```
+
+Often a situation arises in which one needs to test whether a value satisfies two interfaces, such as an iterable mapping, but the `Iterable` and `Mapping` interfaces both embed the `Value` interface, and thus contain overlapping sets of methods.
+
+```Go
+package mypkg
+
+type IterableMapping interface {
+    starlark.Mapping
+    starlark.Iterable // error: duplicate method String (et al)
+}
+```
+With the proposed rule change, `IterableMapping` will become a valid type declaration.
\ No newline at end of file