[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] ideas from ruby and clean




in ruby (1..4) gives a range much like sc's current array notation but you can also go

(1...4) giving [1,2,3]

unrelated, but more interesting, in clean language you can write [n..]:

which in sc could be written (n..) returning

	r {
		loop {
			yield(n);
			n = n + 1;
		}
	}

http://www.cs.ru.nl/~clean/About_Clean/tutorial/tutorial.html

kind of cool,
_c