   public let schema: Schema?
 }
 
-protocol CustomReflectable {
+
+extension Mirror {
+  internal struct LegacyChildren : CollectionType {
+    init(_ oldMirror: MirrorType) {
+      self._oldMirror = oldMirror
+    }
+    var startIndex: Int { return 0 }
+    var endIndex: Int { return _oldMirror.count }
+    subscript(position: Int) -> Child {
+      let (label, childMirror) = _oldMirror[position]
+      return (label: label, value: childMirror.value)
+    }
+    func generate() -> IndexingGenerator<LegacyChildren> {
+      return IndexingGenerator(self)
+    }
+    internal let _oldMirror: MirrorType
+  }
+  
+  public init(_ oldMirror: MirrorType) {
+    self.init(
+      structure: LegacyChildren(oldMirror),
+      schema: oldMirror.disposition)
+  }
+}
+
+public protocol CustomReflectable {
   func reflect() -> Mirror
+}
+
+func reflect(x: Any) -> Mirror {
+  if let customized? = x as? CustomReflectable {
+    return customized.reflect()
+  }
+  else {
+    return Mirror(Swift.reflect(x))
+  }
+}
+
+//===--- Addressing -------------------------------------------------------===//
+public protocol MirrorPathType {}
+extension IntMax : MirrorPathType {}
+extension Int : MirrorPathType {}
+extension String : MirrorPathType {}
+
+enum MirrorPathElement {
+case Offset(IntMax)
+case Label(String)
+  init(_ x: MirrorPathType) {
+    switch x {
+    case let a as IntMax:
+      self = .Offset(a)
+    case let a as Int:
+      self = .Offset(IntMax(a))
+    case let a as String:
+      self = .Label(a)
+    default:
+      _preconditionFailure("unknown MirrorPathType")
+    }
+  }
+}
+
+/// Returns the first index `i` in `indices(domain)` such that
+/// `predicate(domain[i])` is `true``, or `nil` if
+/// `predicate(domain[i])` is `false` for all `i`.
+///
+/// Complexity: O(\ `count(domain)`\ )
+public func find<
+  C: CollectionType
+>(domain: C, predicate: (C.Generator.Element)->Bool) -> C.Index? {
+  for i in indices(domain) {
+    if predicate(domain[i]) {
+      return i
+    }
+  }
+  return nil
+}
+
+extension Mirror {
+  struct _Dummy : CustomReflectable {
+    var mirror: Mirror
+    func reflect() -> Mirror { return mirror }
+  }
+  
+  func address(first: MirrorPathType, _ rest: MirrorPathType...) -> Any? {
+    var result: Any = _Dummy(mirror: self)
+    for e in [first] + rest {
+      let structure = reflect(result).structure
+      let position: Structure.Index
+      switch MirrorPathElement(e) {
+      case .Offset(let n):
+        position = advance(structure.startIndex, n, structure.endIndex)
+      case .Label(let l):
+        position = find(structure) { $0.label == l } ?? structure.endIndex
+      }
+      if position == structure.endIndex { return nil }
+      result = structure[position].value
+    }
+    return result
+  }
 }
 
 //===--- Adapters ---------------------------------------------------------===//

mirrors.test("ForwardStructure") {
  struct DoubleYou : CustomReflectable {
    func reflect() -> Mirror {
      return Mirror(Set(letters), schema: .Set)
    }
  }

  let w = DoubleYou().reflect()
  expectEqual(.Set, w.schema)
  expectEqual(count(letters), numericCast(count(w.structure)))
  
  // Because we don't control the order of a Set, we need to do a

  public typealias Child = (label: String?, value: Any)
  public typealias Structure = AnyForwardCollection<Child>
  
  // public enum Schema {
  // case Struct, Class, Enum, Optional, Array, Dictionary, Set
  // }

  public typealias Schema = MirrorDisposition
  
  public init<
    C: CollectionType where C.Generator.Element == Child
  >(structure: C, schema: Schema? = nil) {
    self.structure = Structure(structure)
    self.schema = schema
  }

  public init<
    C: CollectionType
  >(_ unlabeledChildren: C, schema: Schema? = nil) {
    self.structure = Structure(
      lazy(unlabeledChildren).map { Child(label: nil, value: $0) }
    )
