Add a drainTo function, dual to gatherFrom
Missing export added.