One of the top contenders for 2018’s informal “song of the summer” wasn’t actually one song — it was three. Rapper Travis Scott’s “Sicko Mode” is a five-minute voyage through three sections, each with a distinct beat and hook; the parts swerve and crash into each other, creating a distractible but thrilling whole.

When you listen to Scott and guest artist Drake taking turns yelling “like a light,” you probably won’t think of Paul McCartney, however. It’s not likely that Scott was thinking about the former Beatle, either, when he penned lyrics about cognac and infinity pools.

“Sicko Mode’s” sprawling structure owes a debt to McCartney, who has helped popularize the medley format — in the process elevating it into an art form of its own.

But “Sicko Mode’s” sprawling structure owes a debt to McCartney, who has helped popularize the medley format — in the process elevating it into an art form of its own. Recognized publicly or not, McCartney’s use of the medley has not only led to some of his best work, but also has informed the songwriting of countless other songwriters of the past and present. Indeed, the 76-year-old icon has been stringing together morsels of ingenuity for 50 years — a trend that continues on his newest album, “Egypt Station,” which arrived last week and contains two six-plus-minute voyages.

Obviously, medleys existed before McCartney began exploring them in depth in the late ‘60s, but they mostly fell into two categories: extremely similar songs being performed as one — like Little Richard’s “Kansas City / Hey Hey Hey Hey” (later covered by the Beatles) — or in suites inspired by musical theater or operatic traditions (like in “West Side Story”). McCartney’s innovation, alongside co-conspirators John Lennon and producer George Martin, was to weave together pop songs that were compositionally and narratively separate but thematically linked. As seen on the opening and closing salvos of “Sgt. Pepper's Lonely Hearts Club Band,” these mutant song structures built blooming fictional worlds and corralled the increasingly divergent writing styles of Lennon and McCartney.

John Lennon, Ringo Starr, Paul McCartney and George Harrison on Salisbury Plain during the filming of 'Help', March 5, 1965. PA Wire via AP Images file

When the Beatles fell apart in 1969, McCartney had the idea to assemble some of the band’s most intriguing leftover demos into a collage. The result, the suite on side two of “Abbey Road,” is one of the most revered stretches of pop music ever recorded. But unlike the Who’s “Tommy” — another piece of seamless music which arrived four months earlier and was driven by a twisting plot — the “Abbey Road” suite is bound simply by shrewd musical connections. The suite suggested the future of rock could have both lofty and disparate aims — and that could refuse to be beholden to tidy or even coherent verse-chorus-verse packages.

What some called bloat others called majesty. In the coming years, Pink Floyd would rarely put out a song that wasn’t connected to its adjacent one on record, while prog rock groups like Rush toyed with increasingly byzantine song structures. McCartney, meanwhile, stayed at the forefront after going solo, splicing together microhooks to form long and winding journeys. Unlike the snippets on “Abbey Road,” which all possessed a similar even-keeled warmth, his new packages contained stranger and stranger segments; the results were puzzling on first listen but coalesced with grace.

Perhaps the best example is “Uncle Albert/Admiral Halsey,” the centerpiece on McCartney’s controversial 1971 album “Ram,” which was reviled upon release but has since been widely hailed as a progenitor of indie pop. The five-minute song enters as a meek, rain-soaked apology before stepping into a sprightly and pompous march and then ending with an absurdist, helium-fueled chase sequence. It’s messy and disorienting; it’s also euphoric and intense.

As McCartney continued to create labyrinthian treatises — from “Band on the Run” to “Picasso’s Last Words (Drink to Me)” to “Live and Let Die” — a crop of artists emerged that eagerly professed their fealty to his innovative mania, from Bruce Springsteen to Billy Joel to Queen. Joel wrote perhaps the most overt homage with “Scenes From an Italian Restaurant,” which he said was directly inspired by the “Abbey Road” suite.

But McCartney’s influence wasn’t limited to rock. Thirty years after rock chased its heightened artistic ambitions, hip-hop did the same: The turn of the 1990s saw a generation of musicians, from Public Enemy to De La Soul to the Beastie Boys, experimenting with increasingly fragmented song parts and modes of sampling. The Beastie Boys’ aptly named album “Paul’s Boutique,” in particular, is credited with changing hip-hop with its schizophrenic sampling techniques. And any doubt that it fell into McCartney’s lineage was erased with the album’s sixth song, “The Sounds of Science” — in which the group directly sampled the medleys from both “Abbey Road” and “Sgt. Peppers.”

This year, the traces of this strand of McCartney’s musical DNA can be found all over the pop world, if you listen intently enough. While Travis Scott hops between melodies, the rapper Tierra Whack took the medley to its logical extreme, creating an album of 15 one-minute snippets. And Mitski’s “Be the Cowboy” features bite-sized songs that flow into each other; they’re also rife warm, propulsive piano parts and wonky chord changes.

But you could argue that the best medley of the year still belongs to McCartney. The last song on “Egypt Station,” “Hunt You Down / Naked / C-Link,” deserves to be on any future McCartney box set as it races from mindless bop to vulnerable confession to instrumental ooze. It’s a reminder of how he’s taught musicians of all stripes to expand their song time lengths, and more importantly, their ambition.