curry scan() for #540