The implementation below can also return `{ :error, term }`. Maybe we should make this `{ :ok, [integer] }`?