Changeset 34089 in project


Ignore:
Timestamp:
05/27/17 13:01:23 (3 months ago)
Author:
sjamaan
Message:

man/5: Update condition->list description, add new condition constructor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Module (chicken condition)

    r34084 r34089  
    143143 ((condition-property-accessor KIND PROPERTY [DEFAULT]) CONDITION)
    144144
     145==== condition
     146
     147<procedure>(condition LST1 LST2 ...)</procedure>
     148
     149This is a more convenient constructor for conditions.  Each of
     150{{LST1}}, {{LST2}} etc is a list of the following form:
     151
     152  (KIND PROPERTY1 VALUE1 PROPERTY2 VALUE2 ...)
     153
     154In other words, the following:
     155
     156  (signal (condition '(exn location foo message "hi") '(file bar 1)))
     157
     158is equivalent to the SRFI-12 code:
     159
     160  (signal (make-composite-condition
     161            (make-property-condition 'exn 'location 'foo 'message "hi")
     162            (make-property-condition 'file 'bar 2)))
     163
     164
    145165==== condition->list
    146166
     
    151171formatted as follows:
    152172
    153  ((KIND1 (PROPERTY1 VALUE1) (PROPERTY2 VALUE2) ...) (KIND2 ... ) ... )
     173 ((KIND1 PROPERTY1 VALUE1 PROPERTY2 VALUE2 ...) (KIND2 ... ) ... )
    154174
    155175There is no guaranteed order within the list.
Note: See TracChangeset for help on using the changeset viewer.