Talk:M-expression

It is perhaps notable that the computer algebra system Mathematica uses the M-Expression syntax as its "generic" representation of data and functions. —Prece

Talk:M-expression

Mathematica

It is perhaps notable that the computer algebra system Mathematica uses the M-Expression syntax as its "generic" representation of data and functions. —Preceding unsigned comment added by JasticE (talkcontribs) 22:08, 17 November 2004

What is an M-expression

This page doesn't say what an M-expression is. — Preceding unsigned comment added by 81.164.106.200 (talk) 18:42, 14 February 2013 (UTC)Reply

M-expressions are homoiconic

Given that Lisp encoded as S-expressions is homoiconic, and that M-expressions form a one-to-one, invertible correspondence with their equivalent S-expressions, it should then be obvious that M-expressions are thus also homoiconic. Therefore, no expressive power is lost by the utilization of M-expression syntax compared to S-expression syntax.

Hello fellow Wikipedians,

I have just modified one external link on M-expression. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 14:22, 28 May 2017 (UTC)Reply

why 'T' or 't'?

in the table example...

[lessp[x;0] → minus[x]; T → x] (cond ((< x 0) (- x)) (t x))

... why e.g. "(t x)" instead of just 'x' or "(x)"?

(I'm a noob re Lisp.) Abe149 (talk) 04:02, 26 July 2023 (UTC)Reply

COND clauses starts with a condition. Anything that isn't NIL is true, but the symbol T is used as the canonical value for truth. So `(t x)` is a clause that is always selected if we reach it (because its condition is just T) and whose result is the value of X.
X by itself is a syntax error (at least in Common Lisp and Scheme) because COND clauses need to be lists. `(X)` would work here: X is used as the condition, and if it's true, its value will be returned since we don't give an explicit value for that clause, and if X is NIL, then we run out of COND clauses, so the result of the COND will be NIL. The difference is that `(X)` is selected or not based off whether X is NIL, and if it's not selected, we only get NIL because no clauses were selected; if you put another clause after `(t x)`, it would never be selected (because T is always true), but if you put one after `(x)`, it would be selected in the cases where X is NIL.
`(t x)` also matches the mexpr syntax which needs something on the left of the arrow. 204.83.110.176 (talk) 16:19, 30 December 2023 (UTC)Reply

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.