《structs and interpretation of computer program》讀書筆記

编程入门 行业动态 更新时间:2024-10-25 17:28:59
In general, we shall see that recursion is a very powerful technique for dealing
with hierarchical, treelike objects.

2008-01-03
1.The general form of a procedure definition is
(define (<name> <formal parameters>) <body>)
2.The general form of a conditional expression is
Structure and interpretation of Computer Programs
(cond (<p1> <e1>)
(<p2> <e2>)
(<pn> <en>))

3. The general form of an if expression is
(if <predicate> <consequent> <alternative>)

4. (and <e1> ... <en>)
The interpreter evaluates the expressions <e> one at a time, in left-to-right order. If any <e>
evaluates to false, the value of the and expression is false, and the rest of the <e>'s are not
evaluated. If all <e>'s evaluate to true values, the value of the and expression is the value of the
last one.
l  
(or <e1> ... <en>)
The interpreter evaluates the expressions <e> one at a time, in left-to-right order. If any <e>
evaluates to a true value, that value is returned as the value of the or expression, and the rest of
the <e>'s are not evaluated. If all <e>'s evaluate to false, the value of the or expression is false.
l  
(not <e>)
The value of a not expression is true when the expression <e> evaluates to false, and false
otherwise.

转载于:https://wwwblogs/anchenjie007/archive/2007/12/28/1018800.html

更多推荐

《structs and interpretation of computer program》讀書筆記

本文发布于:2023-06-14 01:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1421396.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:interpretation   structs   computer   讀書筆記   program

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!