[ "4" ] [
[
- "4" "a" set
- "http://localhost" add-addr "__u" set
- "session-id" get session-id-key set
- ] H{ } make-assoc
+ "4" "a" ,,
+ "http://localhost" add-addr "__u" ,,
+ "session-id" get session-id-key ,,
+ ] H{ } make
"http://localhost/" add-addr <post-request> "cookies" get >>cookies http-request nip test-a
] unit-test
! Test flash scope
[ "xyz" ] [
[
- "xyz" "a" set
- "http://localhost" add-addr "__u" set
- "session-id" get session-id-key set
- ] H{ } make-assoc
+ "xyz" "a" ,,
+ "http://localhost" add-addr "__u" ,,
+ "session-id" get session-id-key ,,
+ ] H{ } make
"http://localhost/" add-addr <post-request> "cookies" get >>cookies http-request nip test-a
] unit-test
dup word? [ "match-var" word-prop ] [ drop f ] if ;
: set-match-var ( value var -- ? )
- dup namespace key? [ get = ] [ set t ] if ;
+ dup building get key? [ get = ] [ ,, t ] if ;
: (match) ( value1 value2 -- matched? )
{
} cond ;
: match ( value1 value2 -- bindings )
- [ (match) ] H{ } make-assoc swap [ drop f ] unless ;
+ [ (match) ] H{ } make swap [ drop f ] unless ;
MACRO: match-cond ( assoc -- )
<reversed>
2dup length head over match
[ swap ?1-tail ] [ [ rest ] dip (match-first) ] ?if
] if ;
-
+
: match-first ( seq pattern-seq -- bindings )
(match-first) drop ;
M: obj-models stream>models
drop
[
- V{ } clone vp set
- V{ } clone vt set
- V{ } clone vn set
- V{ } clone models set
- V{ } V{ } H{ } <indexed-seq> current-model set
- f current-material set
- f material-dictionary set
- ] H{ } make-assoc
+ V{ } clone vp ,,
+ V{ } clone vt ,,
+ V{ } clone vn ,,
+ V{ } clone models ,,
+ V{ } V{ } H{ } <indexed-seq> current-model ,,
+ f current-material ,,
+ f material-dictionary ,,
+ ] H{ } make
[
[ line>obj ] each-stream-line push-current-model
models get