Merge remote branch 'Blei/master'
commit
88fb562f3a
|
@ -7,7 +7,7 @@ IN: slots
|
||||||
ARTICLE: "accessors" "Slot accessors"
|
ARTICLE: "accessors" "Slot accessors"
|
||||||
"For every tuple slot, a " { $emphasis "reader" } " method is defined in the " { $vocab-link "accessors" } " vocabulary. The reader is named " { $snippet { $emphasis "slot" } ">>" } " and given a tuple, pushes the slot value on the stack."
|
"For every tuple slot, a " { $emphasis "reader" } " method is defined in the " { $vocab-link "accessors" } " vocabulary. The reader is named " { $snippet { $emphasis "slot" } ">>" } " and given a tuple, pushes the slot value on the stack."
|
||||||
$nl
|
$nl
|
||||||
"Writable slots - that is, those not attributed " { $link read-only } " - also have a " { $emphasis "writer" } ". The writer is named " { $snippet "(>>" { $emphasis "slot" } ")" } " and stores a value into a slot. It has stack effect " { $snippet "( value object -- )" } ". If the slot is specialized to a specific class, the writer checks that the value being written into the slot is an instance of that class first. See " { $link "tuple-declarations" } " for details."
|
"Writable slots - that is, those not attributed " { $link read-only } " - also have a " { $emphasis "writer" } ". The writer is named " { $snippet { $emphasis "slot" } "<<" } " and stores a value into a slot. It has stack effect " { $snippet "( value object -- )" } ". If the slot is specialized to a specific class, the writer checks that the value being written into the slot is an instance of that class first. See " { $link "tuple-declarations" } " for details."
|
||||||
$nl
|
$nl
|
||||||
"In addition, two utility words are defined for each writable slot."
|
"In addition, two utility words are defined for each writable slot."
|
||||||
$nl
|
$nl
|
||||||
|
|
|
@ -29,8 +29,7 @@ TUPLE: link attributes clickable ;
|
||||||
: find-between* ( vector i/f tag/f -- vector )
|
: find-between* ( vector i/f tag/f -- vector )
|
||||||
over integer? [
|
over integer? [
|
||||||
[ tail-slice ] [ name>> ] bi*
|
[ tail-slice ] [ name>> ] bi*
|
||||||
dupd find-matching-close drop dup [ 1 + ] when
|
dupd find-matching-close drop 0 or 1 + head
|
||||||
[ head ] [ first ] if*
|
|
||||||
] [
|
] [
|
||||||
3drop V{ } clone
|
3drop V{ } clone
|
||||||
] if ; inline
|
] if ; inline
|
||||||
|
|
Loading…
Reference in New Issue