Folks,

Here's a simple thing which I've needed to do quite a bit of, but
couldn't quite figure out how you'd do it in Rebol so tended to do
things the long way.

Let's take a block of stuff;

Stuff: make block! ["fire" "water" "air" "water" "water" "air"]

Now the object of the excersize is to to build block with all of the
unique values. That bit is easy;

foundstuff: make block! []
foreach bitofstuff stuff [
  if found? find foundstuff bitofstuff [
    append foundstuff bitofstuff
    ]
  ]

After this, all of the unique values are loaded into the 'foundstuff'
block.

The question is, say I wanted to do this but count each instance of
the words as they are subsequently found? IE I could somehow tell that
water was found 3 times and air was found twice.

This is where my rudimentary grasp of Rebol fails me. :)

Regards,

Mat Bettinson
Codeplay

Tel: +44 (0)20 7482 3382
140-142 Kentish Town Rd, London, NW1 9QB
http://www.codeplay.com

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to