ImageProtocol を導入して Image と ImageSlice で共通の実装を持たせるとこが今朝大分できたのに・・・。Slice にできないと思う。ArraySlice の名前が残るならそれでもいいけど、Subimage にするか ImageSlice にするかで迷って、 ArraySlice 的なアップデートができるからそっちに寄せて ImageSlice にした。ArraySlice おもしろくて、↓みたいな挙動する。 let a = [2, 3, 5, 7, 11] let b: ArraySlice<Int> = a[1...3] // [3, 5, 7] let c: ArraySlice<Int> = [3, 5, 7] b[1] // 3 c[0] // 3 b == c // true