TheBestLinks.com
TheBestLinks.com
M-expression, Lisp programming language, TheBestLinks.com:Find or fix a stub... Print friendly version | Tell a friend
 
Navigation
Search
Toolbox

M-expression

From TheBestLinks.com

M-Expressions are so-called meta-expressions which were intended to be used in Lisp.

S-expressions intended to represent data structures or parsed mathematical expressions look like this:

 (+ 4 (- 5 3))

which is simply prefix notation for (5-3) + 4 However, in LISP, lists and programming constructs such as a conditional branch are also represented in this way, e.g.

 (if (> a 5) dothis orelsedothis)

A representation was developed so that this could be written down in a more user friendly way, for example [1, 2, 3] for a list. These M-expressions are then translated to S-expressions to be executed, hence the meta designation.

A few examples of an M-expression and the equivalent S-expression follow.

 [1, 2, 3]   (1 2 3)
 car[X]      (car X)


Related links


Top visited 0 of 0 links

[no links posted yet]

>> place link >>

Discussion

Last posted 0 of 0 messages

[no messages posted yet]

>> post message >>

Watch

You can add this article to your own "watchlist" and receive e-mail notification about all changes in this page.
 
   
Innovate it
This page was last modified 09:07, 3 Sep 2004.
  Content is available under GNU Free Documentation License 1.2.
Powered by MediaWiki