Saving a lot of work on ADTs. Finishing should mostly just be filling in the different operator functions in the c_generator

This commit is contained in:
Nathan Braswell
2016-03-19 21:45:07 -04:00
parent 6fff4c5363
commit d864a58bb4
5 changed files with 302 additions and 82 deletions

View File

@@ -258,6 +258,7 @@ obj vector<T> (Object, Serializable) {
}
return newVec
}
fun find_first_satisfying(func: fun(T):bool): T return filter(func)[0]
fun filter(func: fun(T):bool):vector<T> {
var newVec.construct(): vector<T>
for (var i = 0; i < size; i++;)