`map(long, toids)` would suffice?