FYI, type parameter can be inferred, you can just write `nodeList_size(ns)`, `nodeList_filter(ns, f)` and `nodeList_foreach(ns, f)`