Skip to content

Commit a9c6a21

Browse files
authored
fixes #861 (#1035)
1 parent c8d4929 commit a9c6a21

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

static/img_javascript/ex-3-13-sol.png

18 KB
Loading

xml/chapter3/section3/subsection1.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,17 @@ list_ref(z, 100);
832832
</JAVASCRIPT>
833833
</SPLITINLINE>
834834
<LABEL NAME="ex:make-cycle"/>
835+
<SOLUTION>
836+
(provided by GitHub user jonathantorres)
837+
If we try to compute <JAVASCRIPTINLINE>last_pair(z)</JAVASCRIPTINLINE>, the
838+
program will enter in a infinite loop, since the end of the list points back
839+
to the beginning.
840+
841+
<FIGURE src="img_javascript/ex-3-13-sol.png">
842+
<LABEL NAME= "ex:3-13-sol"/>
843+
</FIGURE>
844+
845+
</SOLUTION>
835846
</EXERCISE>
836847

837848
<EXERCISE>

0 commit comments

Comments
 (0)