refY.html (1983B)
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd"> 2 <html lang="en"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <title>Y</title> 6 <link rel="stylesheet" href="doc.css" type="text/css"> 7 </head> 8 <body> 9 10 <h1>Y</h1> 11 12 <dl> 13 14 <dt><a name="yield"><code>(yield 'any ['sym]) -> any</code></a> 15 <dd>(64-bit version only) Transfers control from the current <a 16 href="ref.html#coroutines">coroutine</a> back to the caller (when the 17 <code>sym</code> tag is not given), or to some other coroutine (specified by 18 <code>sym</code>) to continue execution at the point where that coroutine had 19 called <code>yield</code> before. In the first case, the value <code>any</code> 20 will be returned from the corresponding <code><a 21 href="refC.html#co">co</a></code> call, in the second case it will be the return 22 value of that <code>yield</code> call. See also <code><a 23 href="refS.html#stack">stack</a></code>, <code><a 24 href="refC.html#catch">catch</a></code> and <code><a 25 href="refT.html#throw">throw</a></code>. 26 27 <pre><code> 28 : (co "rt1" # Start first routine 29 (msg (yield 1) " in rt1 from rt2") # Return '1', wait for value from "rt2" 30 7 ) # Then return '7' 31 -> 1 32 33 : (co "rt2" # Start second routine 34 (yield 2 "rt1") ) # Send '2' to "rt1" 35 2 in rt1 from rt2 36 -> 7 37 </code></pre> 38 39 <dt><a name="yoke"><code>(yoke 'any ..) -> any</code></a> 40 <dd>Inserts one or several new elements <code>any</code> in front of the list in 41 the current <code><a href="refM.html#make">make</a></code> environment. 42 <code>yoke</code> returns the last inserted argument. See also <code><a 43 href="refL.html#link">link</a></code>, <code><a 44 href="refC.html#chain">chain</a></code> and <code><a 45 href="refM.html#made">made</a></code>. 46 47 <pre><code> 48 : (make (link 2 3) (yoke 1) (link 4)) 49 -> (1 2 3 4) 50 </code></pre> 51 52 </dl> 53 54 </body> 55 </html>