⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 refm.html

📁 A very small LISP implementation with several packages and demo programs.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
-> T: @X-> ((a b c)): @Y-> ((e f) g): @Z-> (h i)</code></pre><dt><a name="max"><code>(max 'any ..) -> any</code></a><dd>Returns the largest of all <code>any</code> arguments. See also <ahref="ref.html#cmp">Comparing</a>.<p><pre><code>: (max 2 'a 'z 9)-> z: (max (5) (2 3) 'X)-> (5)</code></pre><dt><a name="maxKey"><code>(maxKey 'tree ['any1 ['any2]]) -> any</code></a><dd>Returns the largest key in a database tree. If a minimal key<code>any1</code> and/or a maximal key <code>any2</code> is given, the largestkey from that range is returned. See also <code><ahref="refT.html#tree">tree</a></code>, <code><ahref="refL.html#leaf">leaf</a></code>, <code><ahref="refM.html#minKey">minKey</a></code> and <code><ahref="refG.html#genKey">genKey</a></code>.<p><pre><code>: (maxKey (tree 'nr '+Item))-> 7: (maxKey (tree 'nr '+Item) 3 5)-> 5</code></pre><dt><a name="maxi"><code>(maxi 'fun 'lst ..) -> any</code></a><dd>Applies <code>fun</code> to each element of <code>lst</code>. Whenadditional <code>lst</code> arguments are given, their elements are also passedto <code>fun</code>. Returns that element from <code>lst</code> for that<code>fun</code> returned a maximal value. See also <code><ahref="refM.html#mini">mini</a></code>.<p><pre><code>: (setq A 1  B 2  C 3)-> 3: (maxi val '(A B C))-> C: (maxi                          # Symbol with largest list value   '((X)      (and (pair (val X)) (size @)) )   (what) )-> *History</code></pre><dt><a name="member"><code>(member 'any 'lst) -> any</code></a><dd>Returns the tail of <code>lst</code> that starts with <code>any</code> when<code>any</code> is a member of <code>lst</code>, otherwise <code>NIL</code>.See also <code><a href="refM.html#memq">memq</a></code>, <code><ahref="refA.html#assoc">assoc</a></code> and <code><ahref="refI.html#idx">idx</a></code>.<p><pre><code>: (member 3 (1 2 3 4 5 6))-> (3 4 5 6): (member 9 (1 2 3 4 5 6))-> NIL: (member '(d e f) '((a b c) (d e f) (g h i)))-> ((d e f) (g h i))</code></pre><dt><a name="memq"><code>(memq 'any 'lst) -> any</code></a><dd>Returns the tail of <code>lst</code> that starts with <code>any</code> when<code>any</code> is a member of <code>lst</code>, otherwise <code>NIL</code>.<code><a href="ref_.html#==">==</a></code> is used for comparison (pointerequality). See also <code><a href="refM.html#member">member</a></code>, <code><ahref="refM.html#mmeq">mmeq</a></code>, <code><ahref="refA.html#asoq">asoq</a></code> and <code><ahref="refD.html#delq">delq</a></code>.<p><pre><code>: (memq 'c '(a b c d e f))-> (c d e f): (memq (2) ((1) (2) (3)))-> NIL</code></pre><dt><a name="meta"><code>(meta 'obj|typ 'sym ['sym2|cnt ..]) -> any</code></a><dd>Fetches a property value <code>any</code>, by searching the property listsof the classes and superclasses of <code>obj</code>, or the classes in<code>typ</code>, for the property key <code>sym</code>, and by applying the<code><a href="refG.html#get">get</a></code> algorithm to the following optionalarguments.<p><pre><code>: (setq A '(B))            # Be 'A' an object of class 'B'-> (B): (put 'B 'a 123)-> 123: (meta 'A 'a)             # Fetch 'a' from 'B'-> 123</code></pre><dt><a name="meth"><code>(meth 'obj ..) -> any</code></a><dd>This function is usually not called directly, but is used by <code> <ahref="refD.html#dm">dm</a></code> as a template to initialize the<code>VAL</code> of message symbols. It searches for itself in the methods of<code>obj</code> and its classes and superclasses, and executes that method. Anerror <code>"Bad message"</code> is issued if the search is unsuccessful. Seealso <code><a href="ref.html#oop">OO Concepts</a></code>, <code><ahref="refM.html#method">method</a></code>, <code><ahref="refS.html#send">send</a></code> and <code><ahref="refT.html#try">try</a></code>.<p><pre><code>: meth-> 67283504    # Value of 'meth': stop>-> 67283504    # Value of any message</code></pre><dt><a name="method"><code>(method 'msg 'obj) -> fun</code></a><dd>Returns the function body of the method that would be executed upon sendingthe message <code>msg</code> to the object <code>obj</code>. If the messagecannot be located in <code>obj</code>, its classes and superclasses,<code>NIL</code> is returned. See also <code><ahref="ref.html#oop">OO Concepts</a></code>, <code><ahref="refS.html#send">send</a></code>, <code><ahref="refT.html#try">try</a></code>, <code><ahref="refM.html#meth">meth</a></code>, <code><ahref="refS.html#super">super</a></code>, <code><ahref="refE.html#extra">extra</a></code>, <code><ahref="refC.html#class">class</a></code>.<p><pre><code>: (method 'mis> '+Number)-> ((Val Obj) (and Val (not (num? Val)) "Numeric input expected"))</code></pre><dt><a name="min"><code>(min 'any ..) -> any</code></a><dd>Returns the smallest of all <code>any</code> arguments. See also <ahref="ref.html#cmp">Comparing</a>.<p><pre><code>: (min 2 'a 'z 9)-> 2: (min (5) (2 3) 'X)-> X</code></pre><dt><a name="minKey"><code>(minKey 'tree ['any1 ['any2]]) -> any</code></a><dd>Returns the smallest key in a database tree. If a minimal key<code>any1</code> and/or a maximal key <code>any2</code> is given, the smallestkey from that range is returned. See also <code><ahref="refT.html#tree">tree</a></code>, <code><ahref="refL.html#leaf">leaf</a></code>, <code><ahref="refM.html#maxKey">maxKey</a></code> and <code><ahref="refG.html#genKey">genKey</a></code>.<p><pre><code>: (minKey (tree 'nr '+Item))-> 1: (minKey (tree 'nr '+Item) 3 5)-> 3</code></pre><dt><a name="mini"><code>(mini 'fun 'lst ..) -> any</code></a><dd>Applies <code>fun</code> to each element of <code>lst</code>. Whenadditional <code>lst</code> arguments are given, their elements are also passedto <code>fun</code>. Returns that element from <code>lst</code> for that<code>fun</code> returned a minimal value. See also <code><ahref="refM.html#maxi">maxi</a></code>.<p><pre><code>: (setq A 1  B 2  C 3)-> 3: (mini val '(A B C))-> A</code></pre><dt><a name="mix"><code>(mix 'lst cnt|'any ..) -> lst</code></a><dd>Builds a list from the elements of the argument <code>lst</code>, asspecified by the following <code>cnt|'any</code> arguments. If such an argumentis a number, the <code>cnt</code>'th element from <code>lst</code> is taken,otherwise that arguments is evaluated and the result is used.<p><pre><code>: (mix '(a b c d) 3 4 1 2)-> (c d a b): (mix '(a b c d) 1 'A 4 'D)-> (a A d D)</code></pre><dt><a name="mmeq"><code>(mmeq 'lst 'lst) -> any</code></a><dd>Returns the tail of the second argument <code>lst</code> that starts with amember of the first argument <code>lst</code>, otherwise <code>NIL</code>.<code><a href="ref_.html#==">==</a></code> is used for comparison (pointerequality). See also <code><a href="refM.html#member">member</a></code>, <code><ahref="refM.html#memq">memq</a></code>, <code><ahref="refA.html#asoq">asoq</a></code> and <code><ahref="refD.html#delq">delq</a></code>.<p><pre><code>: (mmeq '(a b c) '(d e f))-> NIL: (mmeq '(a b c) '(d b x))-> (b x)</code></pre><dt><a name="money"><code>(money 'num ['sym]) -> sym</code></a><dd>Formats a number <code>num</code> into a digit string with two decimalplaces, according to the current <code><ahref="refL.html#locale">locale</a></code>. If an additional currency name isgiven, it is appended (separated by a space). See also <code><ahref="refT.html#telStr">telStr</a></code>, <code><ahref="refD.html#datStr">datStr</a></code> and <code><ahref="refF.html#format">format</a></code>.<p><pre><code>: (money 123456789)-> "1,234,567.89": (money 12345 "EUR")-> "123.45 EUR": (locale "DE" "de")-> NIL: (money 123456789 "EUR")-> "1.234.567,89 EUR"</code></pre><dt><a name="msg"><code>(msg 'any ['any ..]) -> any</code></a><dd>Prints <code>any</code> with <code><ahref="refP.html#print">print</a></code>, followed by all <code>any</code>arguments (printed with <code><a href="refP.html#prin">prin</a></code>) and anewline, to standard error. The first <code>any</code> argument is returned.<p><pre><code>: (msg (1 a 2 b 3 c) " is a mixed " "list")(1 a 2 b 3 c) is a mixed list-> (1 a 2 b 3 c)</code></pre></dl></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -