▁John ▁C . ▁Reyn olds , ▁and ▁further ▁popular ized ▁in ▁a ▁paper ▁by ▁Lu ca ▁Card elli . ▁ ▁When ▁dealing ▁with ▁functions ▁that ▁take ▁functions ▁as ▁arguments , ▁this ▁rule ▁can ▁be ▁applied ▁several ▁times . ▁For ▁example , ▁by ▁applying ▁the ▁rule ▁twice , ▁we ▁see ▁that ▁( A ' → B ) → B ▁ ≤ ▁( A → B ) → B ▁if ▁A ' ≤ A . ▁In ▁other ▁words , ▁the ▁type ▁( A → B ) → B ▁is ▁cov ari ant ▁in ▁the ▁A ▁position . ▁For ▁complicated ▁types ▁it ▁can ▁be ▁confusing ▁to ▁ment ally ▁trace ▁why ▁a ▁given ▁type ▁special ization ▁is ▁or ▁isn ' t ▁type - safe , ▁but ▁it ▁is ▁easy ▁to ▁calculate ▁which ▁positions ▁are ▁co - ▁and ▁cont rav ari ant : ▁a ▁position ▁is ▁cov ari ant ▁if ▁it ▁is ▁on ▁the ▁left ▁side ▁of ▁an ▁even ▁number ▁of ▁ar rows ▁applying ▁to ▁it . ▁ ▁In herit ance ▁in ▁object - orient ed ▁languages ▁ ▁When ▁a ▁subclass ▁over rides ▁a ▁method ▁in ▁a ▁super class , ▁the ▁compiler ▁must ▁check ▁that ▁the ▁overrid ing ▁method ▁has ▁the ▁right ▁type . ▁While ▁some ▁languages ▁require ▁that ▁the ▁type ▁exactly ▁matches ▁the ▁type ▁in ▁the ▁super class ▁( in var iance ), ▁it ▁is ▁also ▁type ▁safe ▁to ▁allow ▁the ▁overrid ing ▁method ▁to ▁have ▁a ▁" bet ter " ▁type . ▁By ▁the ▁usual ▁sub ty ping ▁rule ▁for ▁function ▁types , ▁this ▁means ▁that