Infinitives can act as nouns, adjectives & adverbs in a sentence.
A friend to call would be nice.
Here, "to call" modifies the noun "friend". Therefore an adjective. But in the sentence:
I went outside to sing.
does "to sing" act as an adverb or adjective? The book says that "to sing" modifies the verb "went" (hence an adverb) but doesn't it modify the noun "outside" (hence an adjective).