/usr/share/doc/racket/teachpack/matrix.html is in racket-doc 6.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>1.20 Matrix Functions: "matrix.rkt"</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-style: italic">How to Design Programs</span> Teachpacks</a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="htdp.html" class="tocviewselflink" data-pltdoc="x">Ht<span class="mywbr"> </span>DP Teachpacks</a></td></tr><tr><td align="right">2 </td><td><a href="2htdp2htdp.html" class="tocviewlink" data-pltdoc="x">Ht<span class="mywbr"> </span>DP/<span class="mywbr"> </span>2e Teachpacks</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>1 </td><td><a href="htdp.html" class="tocviewlink" data-pltdoc="x">Ht<span class="mywbr"> </span>DP Teachpacks</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.1 </td><td><a href="image.html" class="tocviewlink" data-pltdoc="x">Manipulating Images:<span class="mywbr"> </span> <span class="stt">"image.rkt"</span><a name="(idx._(gentag._0._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.2 </td><td><a href="world.html" class="tocviewlink" data-pltdoc="x">Simulations and Animations:<span class="mywbr"> </span> <span class="stt">"world.rkt"</span><a name="(idx._(gentag._1._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.3 </td><td><a href="convert.html" class="tocviewlink" data-pltdoc="x">Converting Temperatures:<span class="mywbr"> </span> <span class="stt">"convert.rkt"</span><a name="(idx._(gentag._2._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.4 </td><td><a href="guess.html" class="tocviewlink" data-pltdoc="x">Guessing Numbers:<span class="mywbr"> </span> <span class="stt">"guess.rkt"</span><a name="(idx._(gentag._3._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.5 </td><td><a href="master.html" class="tocviewlink" data-pltdoc="x">Master<span class="mywbr"> </span>Minding:<span class="mywbr"> </span> <span class="stt">"master.rkt"</span><a name="(idx._(gentag._4._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.6 </td><td><a href="master-play.html" class="tocviewlink" data-pltdoc="x">Playing Master<span class="mywbr"> </span>Mind:<span class="mywbr"> </span> <span class="stt">"master-<wbr></wbr>play.rkt"</span><a name="(idx._(gentag._5._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.7 </td><td><a href="draw.html" class="tocviewlink" data-pltdoc="x">Simple Drawing:<span class="mywbr"> </span> <span class="stt">"draw.rkt"</span><a name="(idx._(gentag._6._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.8 </td><td><a href="hangman.html" class="tocviewlink" data-pltdoc="x">Hangman:<span class="mywbr"> </span> <span class="stt">"hangman.rkt"</span><a name="(idx._(gentag._7._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.9 </td><td><a href="hangman-play.html" class="tocviewlink" data-pltdoc="x">Playing Hangman:<span class="mywbr"> </span> <span class="stt">"hangman-<wbr></wbr>play.rkt"</span><a name="(idx._(gentag._8._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.10 </td><td><a href="arrow.html" class="tocviewlink" data-pltdoc="x">Managing Control Arrows:<span class="mywbr"> </span> <span class="stt">"arrow.rkt"</span><a name="(idx._(gentag._9._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.11 </td><td><a href="docs.html" class="tocviewlink" data-pltdoc="x">Manipulating Simple HTML Documents:<span class="mywbr"> </span> <span class="stt">"docs.rkt"</span><a name="(idx._(gentag._10._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.12 </td><td><a href="dir.html" class="tocviewlink" data-pltdoc="x">Working with Files and Directories:<span class="mywbr"> </span> <span class="stt">"dir.rkt"</span><a name="(idx._(gentag._11._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.13 </td><td><a href="graphing.html" class="tocviewlink" data-pltdoc="x">Graphing Functions:<span class="mywbr"> </span> <span class="stt">"graphing.rkt"</span><a name="(idx._(gentag._12._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.14 </td><td><a href="gui.html" class="tocviewlink" data-pltdoc="x">Simple Graphical User Interfaces:<span class="mywbr"> </span> <span class="stt">"gui.rkt"</span><a name="(idx._(gentag._13._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.15 </td><td><a href="arrow-gui.html" class="tocviewlink" data-pltdoc="x">An Arrow GUI:<span class="mywbr"> </span> <span class="stt">"arrow-<wbr></wbr>gui.rkt"</span><a name="(idx._(gentag._14._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.16 </td><td><a href="elevator.html" class="tocviewlink" data-pltdoc="x">Controlling an Elevator:<span class="mywbr"> </span> <span class="stt">"elevator.rkt"</span><a name="(idx._(gentag._15._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.17 </td><td><a href="lkup-gui.html" class="tocviewlink" data-pltdoc="x">Lookup GUI:<span class="mywbr"> </span> <span class="stt">"lkup-<wbr></wbr>gui.rkt"</span><a name="(idx._(gentag._16._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.18 </td><td><a href="guess-gui.html" class="tocviewlink" data-pltdoc="x">Guess GUI:<span class="mywbr"> </span> <span class="stt">"guess-<wbr></wbr>gui.rkt"</span><a name="(idx._(gentag._17._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.19 </td><td><a href="show-queen.html" class="tocviewlink" data-pltdoc="x">Queens:<span class="mywbr"> </span> <span class="stt">"show-<wbr></wbr>queen.rkt"</span><a name="(idx._(gentag._18._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr><tr><td align="right">1.20 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Matrix Functions:<span class="mywbr"> </span> <span class="stt">"matrix.rkt"</span><a name="(idx._(gentag._19._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>1.20 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Matrix Functions:<span class="mywbr"> </span> <span class="stt">"matrix.rkt"</span><a name="(idx._(gentag._19._(lib._teachpack/teachpack..scrbl)))"></a></a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.20.1 </td><td><a href="#%28part._.Matrix_.Snip%29" class="tocviewlink" data-pltdoc="x">Matrix Snip</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-rows%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix-<wbr></wbr>rows</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-cols%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix-<wbr></wbr>cols</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._rectangle-~3ematrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">rectangle-<wbr></wbr>>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-~3erectangle%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix-<wbr></wbr>>rectangle</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._make-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._build-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">build-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-ref%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix-<wbr></wbr>ref</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-where~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix-<wbr></wbr>where?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-render%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix-<wbr></wbr>render</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-minor%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">matrix-<wbr></wbr>minor</span></span></a></td></tr><tr><td><span class="tocsublinknumber">1.20.1<tt> </tt></span><a href="#%28part._.Matrix_.Snip%29" class="tocsubseclink" data-pltdoc="x">Matrix Snip</a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._snip-class%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">snip-<wbr></wbr>class</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="show-queen.html" title="backward to "1.19 Queens: "show-queen.rkt""" data-pltdoc="x">← prev</a> <a href="htdp.html" title="up to "1 HtDP Teachpacks"" data-pltdoc="x">up</a> <a href="2htdp2htdp.html" title="forward to "2 HtDP/2e Teachpacks"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "teachpack/teachpack.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""matrix"">1.20<tt> </tt><a name="(part._matrix)"></a><a name="(mod-path._htdp/matrix)"></a>Matrix Functions: <span class="stt">"matrix.rkt"</span><a name="(idx._(gentag._19._(lib._teachpack/teachpack..scrbl)))"></a></h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=beginner.html%23%2528form._%2528%2528lib._lang%252Fhtdp-beginner..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">htdp/matrix</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The experimental teachpack supports matrices and matrix functions. A
matrix is just a rectangle of ’objects’. It is displayed as an image, just
like the images from <a href="image.html" data-pltdoc="x">Manipulating Images: <span class="stt">"image.rkt"</span><a name="(idx._(gentag._0._(lib._teachpack/teachpack..scrbl)))"></a></a>. Matrices are images and, indeed,
scenes in the sense of the <a href="world.html" data-pltdoc="x">Simulations and Animations: <span class="stt">"world.rkt"</span><a name="(idx._(gentag._1._(lib._teachpack/teachpack..scrbl)))"></a></a>.</p><p><span style="font-style: italic">No educational materials involving matrices exist.</span></p><p>The functions access a matrix in the usual (school-mathematics) manner:
row first, column second.</p><p>The functions aren’t tuned for efficiency so don’t expect to build
programs that process lots of data.</p><p><a name="(tech._rectangle)"></a><span style="font-style: italic">Rectangle</span>
A Rectangle (of X) is a non-empty list of lists containing X where all
elements of the list are lists of equal (non-zero) length.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix~3f))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix?</a></span></span><span class="hspace"> </span><span class="RktVar">o</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">o</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">determines whether the given object is a matrix?</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix-rows))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-rows%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix-rows</a></span></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">determines how many rows this matrix <span class="RktVar">m</span> has</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix-cols))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-cols%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix-cols</a></span></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">determines ow many columns this matrix <span class="RktVar">m</span> has</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._rectangle-~3ematrix))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._rectangle-~3ematrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">rectangle->matrix</a></span></span><span class="hspace"> </span><span class="RktVar">r</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">r</span><span class="hspace"> </span>:<span class="hspace"> </span><a href="#%28tech._rectangle%29" class="techoutside" data-pltdoc="x"><span class="techinside">Rectangle</span></a></td></tr></table></blockquote></div><div class="SIntrapara">creates a matrix from the given <a href="#%28tech._rectangle%29" class="techoutside" data-pltdoc="x"><span class="techinside">Rectangle</span></a></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix-~3erectangle))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-~3erectangle%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix->rectangle</a></span></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><a href="#%28tech._rectangle%29" class="techoutside" data-pltdoc="x"><span class="techinside">Rectangle</span></a></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">creates a rectangle from this matrix <span class="RktVar">m</span></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._make-matrix))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._make-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-matrix</a></span></span><span class="hspace"> </span><span class="RktVar">n</span><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span><span class="RktVar">l</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">n</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">l</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">Listof</span><span class="hspace"> </span><span class="RktSym">X</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">creates an <span class="RktVar">n</span> by <span class="RktVar">m</span> matrix from <span class="RktVar">l</span></div></p><p>NOTE: <span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._make-matrix%29%29" class="RktValLink" data-pltdoc="x">make-matrix</a></span> would consume an optional number of entries, if
it were like <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=vectors.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._make-vector%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">make-vector</a></span></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._build-matrix))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._build-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">build-matrix</a></span></span><span class="hspace"> </span><span class="RktVar">n</span><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span><span class="RktVar">f</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">n</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">f</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktVar">n</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">creates an <span class="RktVar">n</span> by <span class="RktVar">m</span> matrix by applying <span class="RktVar">f</span> to <span class="RktPn">(</span><span class="RktVal">0</span><span class="stt"> </span><span class="RktRdr">,</span><span class="RktVal">0</span><span class="RktPn">)</span>,
<span class="RktPn">(</span><span class="RktVal">0</span><span class="stt"> </span><span class="RktRdr">,</span><span class="RktVal">1</span><span class="RktPn">)</span>, ..., (<span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._sub1%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">sub1</a></span><span class="stt"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktRdr">,</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._sub1%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">sub1</a></span><span class="stt"> </span><span class="RktVar">n</span><span class="RktPn">)</span>)</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix-ref))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-ref%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix-ref</a></span></span><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span><span class="RktVar">j</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-rows%29%29" class="RktValLink" data-pltdoc="x">matrix-rows</a></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">j</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-rows%29%29" class="RktValLink" data-pltdoc="x">matrix-rows</a></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">retrieve the item at (<span class="RktVar">i</span>,<span class="RktVar">j</span>) in matrix <span class="RktVar">m</span></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix-set))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-set%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix-set</a></span></span><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span><span class="RktVar">j</span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-rows%29%29" class="RktValLink" data-pltdoc="x">matrix-rows</a></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">j</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-rows%29%29" class="RktValLink" data-pltdoc="x">matrix-rows</a></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">creates a new matrix with <span class="RktVar">x</span> at (<span class="RktVar">i</span>,<span class="RktVar">j</span>) and all
other places the same as in <span class="RktVar">m</span></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix-where~3f))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-where~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix-where?</a></span></span><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span><span class="RktVar">pred?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp&rel=index.html%23%2528def._%2528%2528lib._lang%252Fposn..rkt%2529._posn%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">posn?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-where~3f%29%29" class="RktValLink" data-pltdoc="x">matrix-where?</a></span><span class="stt"> </span><span class="RktSym">M</span><span class="stt"> </span><span class="RktSym">P</span><span class="RktPn">)</span> produces a list of <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp&rel=index.html%23%2528def._%2528%2528lib._lang%252Fposn..rkt%2529._make-posn%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">make-posn</a></span><span class="stt"> </span><span class="RktSym">i</span><span class="stt"> </span><span class="RktSym">j</span><span class="RktPn">)</span>
such that <span class="RktPn">(</span><span class="RktSym">P</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-ref%29%29" class="RktValLink" data-pltdoc="x">matrix-ref</a></span><span class="stt"> </span><span class="RktSym">M</span><span class="stt"> </span><span class="RktSym">i</span><span class="stt"> </span><span class="RktSym">j</span><span class="RktPn">)</span><span class="RktPn">)</span> holds</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix-render))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-render%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix-render</a></span></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><a href="#%28tech._rectangle%29" class="techoutside" data-pltdoc="x"><span class="techinside">Rectangle</span></a></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">renders this matrix <span class="RktVar">m</span> as a rectangle of strings</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/matrix..rkt)._matrix-minor))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-minor%29%29" class="RktValDef RktValLink" data-pltdoc="x">matrix-minor</a></span></span><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span><span class="RktVar">j</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix~3f%29%29" class="RktValLink" data-pltdoc="x">matrix?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-rows%29%29" class="RktValLink" data-pltdoc="x">matrix-rows</a></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">j</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._matrix-rows%29%29" class="RktValLink" data-pltdoc="x">matrix-rows</a></span><span class="hspace"> </span><span class="RktVar">m</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">creates a matrix minor from <span class="RktVar">m</span> at (<span class="RktVar">i</span>,<span class="RktVar">j</span>)</div></p><h5 x-source-module="(lib "teachpack/teachpack.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Matrix_Snip"">1.20.1<tt> </tt><a name="(part._.Matrix_.Snip)"></a>Matrix Snip</h5><p>The <span class="RktSym">htdp/matrix</span> teachpack exports the <span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._snip-class%29%29" class="RktValLink" data-pltdoc="x">snip-class</a></span> object to
support saving and reading matrix snips.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._htdp/matrix..rkt)._snip-class))"></a><span title="Provided from: htdp/matrix | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fmatrix..rkt%29._snip-class%29%29" class="RktValDef RktValLink" data-pltdoc="x">snip-class</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">instance/of</span><span class="hspace"> </span><span class="RktSym">matrix-snip-class%</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An object to support 2D matrix rendering.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="show-queen.html" title="backward to "1.19 Queens: "show-queen.rkt""" data-pltdoc="x">← prev</a> <a href="htdp.html" title="up to "1 HtDP Teachpacks"" data-pltdoc="x">up</a> <a href="2htdp2htdp.html" title="forward to "2 HtDP/2e Teachpacks"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|