Changeset 35337 in project


Ignore:
Timestamp:
03/24/18 22:37:21 (5 weeks ago)
Author:
kon
Message:

rel 2.1.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/procedure-decoration

    r28426 r35337  
    3232==== make-procedure-decorator
    3333
    34 <procedure>(make-procedure-decorator PREDICATE DECORATOR RETRIEVER [#:initializer INITIALIZER] [#:replace? REPLACE?])</procedure>
     34<procedure>(make-procedure-decorator PREDICATE DECORATOR RETRIEVER [#:initializer INITIALIZER] [#:replace? REPLACE?]) -> procedure-decorator</procedure>
    3535
    3636Returns a new {{procedure-decorator}}.
     
    5555==== procedure-decorator?
    5656
    57 <procedure>(procedure-decorator? OBJECT)</procedure>
     57<procedure>(procedure-decorator? OBJECT) -> boolean</procedure>
    5858
    5959Is the {{OBJECT}} a {{procedure-decorator}}?
     
    6161==== decorate-procedure
    6262
    63 <procedure>(decorate-procedure PROCEDURE PROCEDURE-DECORATOR [ARGUMENTS ...])</procedure>
     63<procedure>(decorate-procedure PROCEDURE PROCEDURE-DECORATOR [ARGUMENTS ...]) -> procedure</procedure>
    6464
    6565Decorate the {{PROCEDURE}} with the {{PROCEDURE-DECORATOR}}.
     
    7777==== decorated-procedure?
    7878
    79 <procedure>(decorated-procedure? PROCEDURE PROCEDURE-DECORATOR)</procedure>
     79<procedure>(decorated-procedure? PROCEDURE PROCEDURE-DECORATOR) -> boolean</procedure>
    8080
    8181Is the {{PROCEDURE}} a decorated by {{PROCEDURE-DECORATOR}}?
     
    8383==== procedure-decoration
    8484
    85 <procedure>(procedure-decoration PROCEDURE PROCEDURE-DECORATOR [ARGUMENTS ...])</procedure>
     85<procedure>(procedure-decoration PROCEDURE PROCEDURE-DECORATOR [ARGUMENTS ...]) -> *</procedure>
    8686
    8787Returns the procedure decoration of {{PROCEDURE-DECORATOR}} for the {{PROCEDURE}}.
     
    9191==== procedure-decorator-getter-and-setter
    9292
    93 <procedure>(procedure-decorator-getter-and-setter PROCEDURE-DECORATOR)</procedure>
     93<procedure>(procedure-decorator-getter-and-setter PROCEDURE-DECORATOR) -> procedure</procedure>
    9494
    9595Returns a single argument getter, and creates a two argument setter, for the
     
    106106==== make-procedure-extender
    107107
    108 <procedure>(make-procedure-extender TAG)</procedure>
     108<procedure>(make-procedure-extender TAG) -> procedure-decorator</procedure>
    109109
    110110Returns a simple {{PROCEDURE-DECORATOR}} that recognizes its' decorations by
     
    137137==== decorated-lambda?
    138138
    139 <procedure>(decorated-lambda? PROCEDURE PREDICATE)</procedure>
     139<procedure>(decorated-lambda? PROCEDURE PREDICATE) -> boolean</procedure>
    140140
    141141Is the {{PROCEDURE}} decorated per the {{PREDICATE}}?
     
    143143==== lambda-decoration
    144144
    145 <procedure>(lambda-decoration PROCEDURE PREDICATE)</procedure>
     145<procedure>(lambda-decoration PROCEDURE PREDICATE) -> *</procedure>
    146146
    147147Returns an object per the {{PREDICATE}} or {{#f}}.
     
    166166=== Examples
    167167
     168<enscript language=scheme>
     169;create a 'docstring' concept
     170(define-procedure-extender docstring procedure-documentation documented-procedure?)
     171
     172;document something
     173(define (foo x) x)
     174(documented-procedure? test-proc) ;=> #f
     175(set! (procedure-documentation foo) "foo is foo")
     176(documented-procedure? test-proc) ;=> #t
     177(procedure-documentation test-proc) ;=> "foo is foo"
     178</enscript>
     179
    168180
    169181=== Notes
     
    187199[[check-errors]]
    188200
     201[[setup-helper]]
     202
    189203
    190204=== Version history
    191205
     206; 2.1.0 : Add types.
    192207; 2.0.2 : Fix for ticket #630.
    193208; 2.0.1 :
     
    197212=== License
    198213
    199 Copyright (c) 2009 Kon Lovett.  All rights reserved.
     214Copyright (c) 2009-2018 Kon Lovett.  All rights reserved.
    200215
    201216Permission is hereby granted, free of charge, to any person obtaining a
Note: See TracChangeset for help on using the changeset viewer.