Paste: Using sequences in locals
Author: | tgunr |
Mode: | factor |
Date: | Sat, 6 Dec 2014 21:22:03 |
Plain Text |
:: uniqueIP ( seq -- uniqueseq )
{ } :> collection!
{ } :> uniques!
seq [ :> item
item getIP :> ip
ip uniques member?
[ uniques ip suffix :> uniques!
collection item suffix :> collection!
] unless
] each
collection
;
Author: | tgunr |
Mode: | factor |
Date: | Sat, 6 Dec 2014 22:01:26 |
Plain Text |
:: uniqueIP ( seq -- uniqueseq )
V{ } :> collection!
V{ } :> uniques!
seq [ :> item
item getIP :> ip
ip uniques member?
[ uniques ip suffix! :> uniques
collection item suffix! :> collection
] unless
] each
collection
;
Author: | tgunr |
Mode: | factor |
Date: | Sat, 6 Dec 2014 22:08:21 |
Plain Text |
:: uniqueIP ( seq -- uniqueseq )
V{ } :> collection!
V{ } :> uniques!
seq [ :> item
item getIP :> ip
ip uniques member?
[ uniques ip suffix! :> uniques
collection item suffix! :> collection
] unless
] each
collection
;
New Annotation