list of A. /// single element (head) and optional structure (tail). struct NonEmptyArray<T> { let head(T) let tail: [T] } 2 Swiftඪ४ܕͰList͕ଘࡏ͠ͳ͍ͷͰɺArrayΛࣄྫʹͯ͠ѻ͏ 13
A> : ValidatedOf<E, A> { data class Valid<out A>(val a: A) : Validated<Nothing, A>() data class Invalid<out E>(val e: E) : Validated<E, Nothing>() } 27