parent
507f814d48
commit
c56a769fef
extra/assocs/lib
|
@ -37,3 +37,10 @@ IN: assocs.lib
|
|||
H{ } clone [
|
||||
swap [ change-at ] 2curry assoc-each
|
||||
] keep ; inline
|
||||
|
||||
: if-at ( obj assoc quot1 quot2 -- )
|
||||
[ dupd at* [ not -rot ? ] keep ] 2dip if ; inline
|
||||
|
||||
: when-at ( obj assoc quot -- ) [ ] if-at ; inline
|
||||
|
||||
: unless-at ( obj assoc quot -- ) [ ] swap if-at ; inline
|
||||
|
|
Loading…
Reference in New Issue