[PATCH 06/40] alist: add a couple of helper functions