Someone is wrong on the Internet.
This is what Whitman actually wrote:
"Leaves of Grass" (1900)
ONCE I pass’d through a populous city, imprinting my brain, for future use, with its shows, architecture, customs, and traditions;
Yet now, of all that city, I remember only a woman I casually met there, who detain’d me for love of me;
Day by day and night by night we were together,—All else has long been forgotten by me;
I remember, I say, only that woman who passionately clung to me;
Again we wander—we love—we separate again;
Again she holds me by the hand—I must not go!
I see her close beside me, with silent lips, sad and tremulous.
It’s nowhere near as simple as “We were together. I forget the rest.” He visited the city in order to “imprint it” in his mind for future reference—and yet an unexpected fling derailed his plains so that his impression of an entire city is overshadowed by the memory of their brief time together. Crucially, though, the brevity of their connection doesn’t void it. We human beings “wander—-we love—we separate again,” and we’re all better off for it. He’s haunted by the memories of transient connections, as we all are, to the extent that they grow to define places he visited for the sole purpose of memorizing for poetic fodder. No matter how much we try to guard against the hurt when they’re gone, relationships of all kinds matter more to us than most anything else.
I’m just saying: source your shit, Internet! The original is probably better than you expect!