Learning at a distance I. Statistical learning of non-adjacent dependencies