You don't even have to study chemistry to do that.
Typically, the base for lean is a strong prescription cold medicine, specifically cough syrup that contains both promethazine and codeine. Over-the-counter cold medicines that contain dextromethorphan as the active ingredient have also been used, as they can produce similar effects and eliminate the need for a doctor's visit.[8][9]
To create a drinkable mixture, the cough syrup is combined with soft drinks, especially fruit-flavored drinks such as Sprite, Mountain Dew or Fanta, and is typically served in a foam cup.[10][11] A hard candy, usually a Jolly Rancher, may be added to give the mixture a sweeter flavor.[1]
Masking the undesired taste may impair judgement of the potency, which is a factor in overdosing
(wikipedia)