In the poem, "A Child said, What is Grass?" Whitman is reminding the reader that life goes on, even after death. In fact, he says there really is no death or death is not we suppose it to be. In death, he states that one is lucky.
When the child asks what is grass, Whitman is at a loss. Then upon reflection, he determines it to be a variety of things. He states that it is the "uncut hair of graves" or the "handkercief of the Lord."
After describing what the grass could be, Whitman creates beautiful lines, claiming that the grass is "Growing among black folks as among white, Kanuck, Tuckahoe, Congressman, Cuff, I give them the same, I receive them the same.
Whitman realizes that prejudices exist but he addresses the issue with mere common sense and causes the reader to realize how absurd prejudices are.
Finally, Whitman states that smallest sprouts of grass give hope that life goes on:
They are alive and well somewhere;
The smallest sprouts show there is really no death,
And if ever there was it led forward life, and does not wait at the end to arrest it,
And ceased the moment life appeared.
All goes onward and outward. . . .and nothing collapses,
And to die is different from what any one supposed, and
To some extent this poem echoes the tone and themes of some of Whitman's other poems, such as "A Carol of Harvest," that explore the sad truths of war. There is a sense of defeat and loss in much of this poem. Whitman arrives at the image of "the beautiful uncut hair of graves" after considering other answers for the child. It is as if he has decided that such a simple and abundant fact of the natural world, the growing of grass, is somehow irrevocably and pervasively tied to the human condition. As grass grows and dies back each season, there is an accompanying season of renewal, growth, and decay that affects human beings.
Whitman likens the short season of the growth of grass to the lifespan of a human, which at first may seem ridiculous, but when it becomes clear he is invoking a relationship to the war dead, those men who die young on the battlefield, then this metaphor makes much more sense. In other words, the short life span of grass, being but a season, is being compared to the short life of the soldier who dies too young. The repeated mention of "young men" and "mothers" and the image of young men being taken from their mothers ("offspring taken soon out of their mothers' laps") echoes this theme as well.