正在加载图片...
6.001, Spring Semester, 2005--Quiz Il Now, suppose we evaluate the following expressions in a fresh env ironment (define foo (set!-start 5)) (set! -careful foo 1 Att ached is a partial env ironment diagram associated with t his evaluat ion. You will notice that the frames are labeled El, etc, and the pro cedure ob jects are labeled Pl, etc. You should complete t his diagram to reflect the st ate of the env ironment after evaluat ion of bot h expressions in order, and then use the result s to answer the follow ing quest ions. Question 5: For each of t he following environments, indicate the value of it s enclosing environment. using one of GE, El, E2, E3 E4 or none or not show Enclosing env ironment El Question 6: For each of the follow ing variables, indicate the value to w hich it is bound, using a number, a symbol, a list of numbers or symbols, or one of P1, P2, P3, P4, P5 Variable Environment value to which bound set!-start GE et ! -careful GE val GE act ion val E3 current￾       E ,& %% , - ) , <%%%   %) -! ￾  ￾  $ ￾   %& ) %   -  %% ,) )% -!  ,  ) ) %  0 ￾& !&  )  0 1%  0 $￾& !  %)  )%   F ) %  ) -  -  0) <%%%  &  ) % ) %%  %, ) , *%%! ￾    )  ) , -%&  ) -  % % -& %   "#$ #$ #$ #$ #     ! % - ￾ ' 5 6 ￾  %  )  ) , -0%&  ) -  ,))  % 0& %  0&  %.0&  %  0%  %.0%&    $ $ $  $ ! 0 -   ,)) 0 %G7%  %G7  - '   , 6  6 - 5 - 5  ￾
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有