{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 10 Notes

# 4 4 4 d5 3 2

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ¤ £ 4¡ "¡4     § ¢¢¨ ¨¥  ! £ 3¢ !  ¥ ¤ ¥  £  D¡ ¢¨ ¡ 5©0   ¢ !¢   4¡ £¤ ¥ v0 v1 v2 v2 v1 v0       usage: number-elements Sometimes you need to generalize the problem before you can solve it. 1.8 Auxiliary Procedures and Context Arguments There are two important observations to be made here: has an independent speciﬁcation. It’s   4 D!¨¥  ¤¢ ¢¤¦§ ¡ 4 ¤¡ !©1 § ¤"£¦§ "  ¡ "¡4 not random! This gives us a slogan: No Mysterious Auxiliaries! When deﬁning an auxiliary procedure, always specify what it does on all arguments, not just the initial values.   4¤ £¦§ "  5D" ¤©¨¥  ¤¢ ¢¤¦§ ¡ 4 ¤¡ !©1 § ¡ "¡4 The two arguments to ferent roles. play two dif- The ﬁrst argument is the list we are working on. It gets smaller at every recursive call. The second argument is an abstraction of the context in which we are workalways works on a sublist of the ing. original list. The second argument re...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online