Explorar el Código

added isEmpty.

Nicolas Cannasse hace 19 años
padre
commit
ae078b6ede
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      std/List.hx

+ 7 - 0
std/List.hx

@@ -75,6 +75,13 @@ class List<T> {
 		}
 	}
 
+	public function isEmpty() : Bool {
+		return switch h {
+		case empty : true;
+		default : false;
+		}
+	}
+
 	public function remove( v : T ) : Bool {
 		var loop;
 		var found = { ref : false };