Changeset 8584 in project


Ignore:
Timestamp:
02/20/08 07:14:28 (12 years ago)
Author:
svnwiki
Message:

Changes applied for John Cowan (74.68.123.175) through svnwiki:

Expanded list and description of core Scheme syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/chicken-for-ruby-programmers

    r8583 r8584  
    1717== Scheme Basics
    1818* Scheme has very simple syntax: (procedure arg1 arg2 arg3 ...)
    19 * A few basic special forms
    20 ** (if ...)
    21 ** (lambda ...)
    22 ** I think there are 3 others. Add them here
     19* There are a few basic special forms to which everything else can be reduced:
     20** (if predicate consequent alternate) - basic conditional
     21** (lambda var-list expression...) - basic function
     22** (set! var value) - assignment
     23** (quote anything) - symbol or list constants
     24** (define var value) - define a variable
     25** (define (name var-list) expression...) - define a variable whose value is a function
     26** (define-macro var expression ...) - define a metaprogram
    2327
    24 (define ...)
    25 (define-macro ...)
    2628(let ...)
    2729(letrec ...)
    2830
    29 
     31Note: define is technically not primitive in Chicken, because you can set! any variable in Chicken whether it's been defined or not.  However, it is best practice to define all variables, and some Schemes enforce this rule.
    3032== Equivalents from Ruby
    3133* Array => List/Vector
Note: See TracChangeset for help on using the changeset viewer.