[REBOL] Re: Counting chars (was Simple things should be simple to do ?)

2000-11-17 Thread Rodney Snell
append str reduce[key "=" val newline] print [key "=" val] ] append str newline ] print "save-ini" print inifile either error? try [write to-file inifile str] [return false][return true] ] --

[REBOL] Re: Counting chars (was Simple things should be simple to do ?)

2000-11-16 Thread Bard & Michal
x27;[EMAIL PROTECTED]' > Subject: [REBOL] Re: Counting chars (was Simple things should be simple > to do ?) > > > It's really the hash that makes it easy. I have an > associative array (that I call a map - much easier to type) > that I use all the tim

[REBOL] Re: Counting chars (was Simple things should be simple to do ?)

2000-11-16 Thread Rodney Snell
nctions a lot easier. If anyone wants I can post the source to mine but others have been posted by better Rebolers at various times. Rodney -Original Message- From: Joel Neely [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 16, 2000 3:23 PM To: [EMAIL PROTECTED] Subject: [REBOL] Re: C

[REBOL] Re: Counting chars (was Simple things should be simple to do ?)

2000-11-16 Thread Joel Neely
Hello, List! Not losing sight of the fact that the original issue was about simple things being simple to do... For comparison, here is the same thing in Perl (no rock-throwing, please!). #!/usr/local/bin/perl -w use English; $test = "sdfsdfsdfsdfsdfsd"; %counts = (); fore

[REBOL] Re: Counting chars (was Simple things should be simple to do ?)

2000-11-16 Thread jeff
Here's another two approaches that are fun: REBOL [] count: func [x /local count cur n1 n2][ sort x count: copy [] cur: first x n1: 1 forall x [ if any [all [tail? next x n1: n1 - 1] x/1 <> cur] [ repend count [cur (n2: index? x) - n1] n1: n2