 }
 
 extension ArrayIndexLens {
-    init(at idx: Int) {
+    public init(at idx: Int) {
         get = { array in
             guard 0..<array.count ~= idx else {
                 return .Error(LensErrorType.ArrayIndexOutOfBounds)


// MARK: - Result

enum LensResult<Element> {
    case OK(Element)
    case Error(LensErrorType)
}

}

extension Lens {
    public init(g: Whole -> Part, s: (Whole, Part) -> Whole) {
        get = { .OK(g($0)) }
        set = { .OK(s($0, $1)) }
    }
}

extension OptionalUnwrapLens {
    public init() {
        get = { optional in
            guard let v = optional else {
                return .Error(LensErrorType.OptionalNone)
