Semaphorins act as attractive and repulsive guidance signals during the development of cortical projections.