[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:03758] Array.uniq! returning nil

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-07-03 10:13:41 UTC
List: ruby-talk #3758
Why Array.uniq! returns nil if it doesn't do anything (every element 
is unique). Same for Array.compact! Next example requires two times 
the memory what uniq! -version would. Could be a problem with large texts.

  uniqChars = text.split(//).uniq

I know it could be coded better using hashes but this is just an example.

	- Aleksi

In This Thread

Prev Next