1. select(p, [], d) = d

  2. select(p, h::t, d) = h when p(h)

  3. select(p, h::t, d) = select(p, t, d) (otherwise)