[REBOL] Re: Another newbie problem
From: Izkata:Comcast at: 2-Feb-2005 18:15
If it's all newline-delimited, I'd use something like:
Text: read/lines %WhateverTheFilesWas
foreach Val Text [
if not find NewList Val [insert tail NewList join Val newline]
write %TheNewFileName rejoin NewList
So that would create a new file with all the values, none being repeated.
(Also, instead of using "insert tail", you can use "append" - but "isnert
is slightly faster)
(For anyone else: ) Did I miss anything? Can it be optimized more?