Depending on their distance from the cell body, dendrites play different roles in learning and memory.