<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>insert(ZZ,Thing,VisibleList) -- copy a list, inserting an element</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_install__Assignment__Method.html">next</a> | <a href="_initial_sphelp.html">previous</a> | <a href="_install__Assignment__Method.html">forward</a> | <a href="_initial_sphelp.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>insert(ZZ,Thing,VisibleList) -- copy a list, inserting an element</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>insert(i,t,x)</tt></div> </dd></dl> </div> </li> <li><span>Function: <a href="_insert_lp__Z__Z_cm__Thing_cm__Visible__List_rp.html" title="copy a list, inserting an element">insert</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>i</tt>, <span>an <a href="___Z__Z.html">integer</a></span></span></li> <li><span><tt>t</tt>, <span>a <a href="___Thing.html">thing</a></span></span></li> <li><span><tt>x</tt>, <span>a <a href="___Visible__List.html">visible list</a></span></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><span>a <a href="___Visible__List.html">visible list</a></span>, a copy of the list <tt>x</tt> in which <tt>t</tt> has been inserted into position <tt>i</tt> of the result. A negative value of <tt>i</tt> is taken relative to the end of the list.</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><table class="examples"><tr><td><pre>i1 : insert(4,t,0..10) o1 = (0, 1, 2, 3, t, 4, 5, 6, 7, 8, 9, 10) o1 : Sequence</pre> </td></tr> <tr><td><pre>i2 : insert(0,t,0..10) o2 = (t, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) o2 : Sequence</pre> </td></tr> <tr><td><pre>i3 : insert(11,t,0..10) o3 = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, t) o3 : Sequence</pre> </td></tr> <tr><td><pre>i4 : insert(-1,t,0..10) o4 = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, t) o4 : Sequence</pre> </td></tr> </table> </div> </div> </div> </body> </html>