Using scan to loop across differenet length of vectors

Depends on what you are doing exactly