Suppose that Either
is declared in the following way,
enum Either<T, U> {
case Left(T)
case Right(U)
}
a.map { b in | |
b.map { c in { | |
foo(b, c) | |
} | |
} | |
for b in a { | |
for c in b { | |
foo(b, c) | |
} |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import static java.lang.System.out; | |
public class VarianceTest { | |
static class Animal { | |
} |
struct Array2<T> { | |
var buffer: Buffer<T> | |
var count: Int | |
init() { | |
buffer = Buffer() | |
count = 0 | |
} | |
init(_ elements: T...) { |
protocol O { | |
func f() -> String | |
} | |
struct A : O { | |
func f() -> String { | |
return "a" | |
} | |
} |
package org.koherent.appengine.test; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Set; | |
import java.util.TreeSet; | |
import javax.servlet.ServletException; |