Implement the "simple typechecker", which avoids HM inference
This commit is contained in:
@@ -5,7 +5,7 @@ type operator[T, U] = fn(&T) -> U;
|
||||
fn option_map[T, U](&operator[T, U] f, &option[T] opt) -> option[U] {
|
||||
alt (opt) {
|
||||
case (some[T](x)) {
|
||||
ret some[U](f[T, U](x));
|
||||
ret some[U](f(x));
|
||||
}
|
||||
case (none[T]()) {
|
||||
ret none[U]();
|
||||
|
||||
Reference in New Issue
Block a user