oldweek5b - !"#$%&'"()#$%*&"+&,(%#-.&/0$.&

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
!"#$% '"()#$%* "+ ,(%#-. /0$. /1234 1(55$) 67378 9$"):$ ;<.:= ,".<#0<. >"#?$)= 1$%0<@)- A<0<B-.:<5= 1#$C$. D<.:= E)-' DF$.: 3 !"#$% '()*+ , -**. /01 2*3)(4+5 6*)738439:74 *;7:97)(4 <9+) -=*> ?(9 -*4* @*))8>A B+*C )( D8+)+E $#- ,1"6 "6 (1& &+. /$# 1$;) <"#6,$#,$#)+.6=9 *$#-+2 $//)66 "#,+ ,1) $**$&9 "#6,)$- +3 1$; $ %"6,7 G$'<BB #0$ C$'#") "H$)<#")%8 (vector [element1] [element2] . ..) => I")?% J(%# B-?$ (list [element1] . ..) (make-vector [num]) => ')$<#$% < C$'#") "+ num $B$5$.#%= <BB (.K"(.@ (make-vector [num] [init-value]) => ')$<#$% < C$'#") "+ num $B$5$.#%= <BB %$# #" init-value (vector-ref v i) => v[i] L :$#% #0$ i #0 $B$5$.# "+ #0$ C$'#") v (vector-set! v i val) => v[i] = val L %$#% #0$ i #0 $B$5$.# "+ #0$ C$'#") v #" val (vector-length v) => )$#().% #0$ B$.:#0 "+ #0$ C$'#") v M$*".@ (%-.: @-++$)$.# "H$)<#")%= #0$)$ <)$ < +$I K-: @-++$)$.'$% K$#I$$. C$'#")% <.@ B-%#%8 2*3)(4+ (F :*>A)= ' < '".#-:("(% KB"'? "+ 5$5")* '$BB% NO3P +") <''$%%-.: <.* -#$5 -. #0$ C$'#") NO!P +") <@@-.: <. -#$5 #" #0$ 5-@@B$ "+ #0$ C$'#")= %-.'$ *"( 0<C$ #" 5"C$ #0$ )$%# "+ #0$ C$'#") @"I. NO!P +") :)"I-.: < C$'#")L *"( 0<C$ #" *)$%%+/$,) < .$I= B<):$) KB"'? "+ 5$5")*Q <@@ 3 #" -.@$R #" :$# .$R# $B$5$.# *"( 5<* 0<C$ S(.K"(.@T $B$5$.#% -. #0$ C$'#")L #0<# -%= B$.:#0 "+ C$'#") -% ."# #0$ %<5$ <% B$.:#0 "+ C<B-@ @<#< D8+)+ (F :*>A)= ' 5<.* (.-#% "+ #I" '$BB% B-.?$@ #":$#0$) K* H"-.#$)% NO!P +") <''$%%-.: <. -#$5 NO3P +") -.%$)#-.: <. -#$5 <.*I0$)$ -. #0$ B-%#= <%%(5-.: I$ 0<C$ < H"-.#$) #" #0$ B"'<#-". NO3P +") :)"I-.: < B-%#L J(%# <@@ -# <# #0$ K$:-. .-.: ") #0$ $.@ O-+ *"( 0<C$ < H"-.#$) #" #0$ $.@P cdr @"I. < B-%# B$.:#0 "+ B-%# -% $R<'#B* #0$ .(5K$) "+ $B$5$.#% *"(UC$ H(# -.#" #0$ B-%# !"#$ #0$ B<%# K(BB$#V ;-#0 B-%#%= *"( <BB"'<#$ < .$I H-$'$ "+ 5$5")* O(%-.: cons P I0$. *"( .$$@ #" <@@ <. $B$5$.#= K(# I-#0 C$'#")= *"( <BB"'<#$ <BB #0$ 5$5")* *"( .$$@ +-)%#= $C$. -+ *"( @".W# 0<C$ $."(:0 @<#< #" +-BB -# (HV 4B%"= J(%# <% *"( '<. 0<C$ @$$H B-%#%= I0$)$ $B$5$.#% "+ < B-%# 5<* K$ < B-%# <% I$BB= *"( '<. <B%" 0<C$ S@$$HT C$'#")%= "+#$. )$+$))$@ #" <% .X@-5$.%-".<B <))<*%= I0$)$ . )$+$)% #" 0"I S@$$HT #0$ @$$H C$'#") -%V Y") $R<5HB$= < #<KB$ I"(B@ K$ < 6X@-5$.%-".<B <))<* Z < C$'#") "+ C$'#")%V !"#$ #0<#= (.B-?$ -.= %<*= /= *"() $<'0 C$'#") -. *"() 6[ #<KB$ @"$% !ND 0<C$ #" 0<C$ #0$ %<5$ %-F$Q \.%#$<@= *"( '<. 0<C$ C<)-<KB$XB$.:#0 )"I% -.%-@$ #0$ %<5$ #<KB$V \. #0-% %$.%$= #0$ C$'#")% "+ 1'0$5$ <)$ 5")$ B-?$ #0$ <))<*% "+ ,<C< #0<. /V
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2011 for the course CS 61A taught by Professor Harvey during the Fall '08 term at University of California, Berkeley.

Page1 / 5

oldweek5b - !"#$%&'"()#$%*&"+&,(%#-.&/0$.&

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online