Changeset 8801 in project


Ignore:
Timestamp:
02/24/08 16:55:50 (12 years ago)
Author:
sjamaan
Message:

Normalize nomenclature: function -> procedure for Scheme examples, function -> method for Ruby examples

File:
1 edited

Legend:

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

    r8750 r8801  
    378378  => [1, 4, 9, 16, 25]
    379379
    380 Scheme also contains blocks, though we call them anonymous functions
    381 usually. Functions are created using the {{(lambda args body...)}} body
     380Scheme also contains blocks, though we call them anonymous procedures
     381usually. Procedures are created using the {{(lambda args body...)}} body
    382382form. This syntax is a little more verbose than Ruby's, but the trade off
    383 is that more than one function can be passed as an argument, whereas Ruby
     383is that more than one procedure can be passed as an argument, whereas Ruby
    384384generally only allows one.
    385385
     
    400400</enscript>
    401401
    402 Similarly, Scheme uses anonymous functions to create the same behavior:
     402Similarly, Scheme uses anonymous procedures to create the same behavior:
    403403
    404404<enscript highlight=scheme>
     
    804804"sublanguages" embedded in Scheme.
    805805
    806 Some people call Rails' {{acts_as_foo}} functions macros. This
    807 description is not wrong, as these functions do ''rewrite'' your
     806Some people call Rails' {{acts_as_foo}} methods "macros". This
     807description is not wrong, as these methods do ''rewrite'' your
    808808classes in a similar way to Scheme macros, but they are not quite
    809809as powerful.
     
    834834</enscript>
    835835
    836 This simply wouldn't be possible with a function. By the time a
    837 procedure is called, syntactic information like variables names
    838 has been optimized away.
    839 
    840 
     836This simply wouldn't be possible with a regular procedure. By the time
     837a procedure is called, syntactic information like variables names has
     838been optimized away.
     839
     840
Note: See TracChangeset for help on using the changeset viewer.