Eddie wrote several tunes with such angular melodies; Mean Greens is my favourite. The part resembling Freedom Jazz Dance is in the middle, before the sesond and third solos. Ambidextrous is another one, more or less a new version of Mean Greens.
What is remarkable about Mean Greens is that the boogaloo riff is present from start to finish, selfless Cedar Walton plays is all the way through except when he solos and Eddie and Roy Codrington play it for him. Walton also plays the riff all through Freedom Jazz Dance, freeing Ron Carter and Billy Higgins. These guys groove the hell out of this tune!