Re: An example of Rust code

2012-08-10 Thread Alex Rønne Petersen
On 10-08-2012 03:44, bearophile wrote: Sorry, my mistake again, this was meant for the main D newsgroup. Bye, bearophile Please repost on the main newsgroup so it gets attention. :) -- Alex Rønne Petersen a...@lycus.org http://lycus.org

Re: An example of Rust code

2012-08-10 Thread bearophile
Alex Rønne Petersen: Please repost on the main newsgroup so it gets attention. :) OK. But I don't know much much interested they will be :-) Bye, bearophile

Re: Convert little imperative code to functional coding style

2012-08-10 Thread Timon Gehr
Is this what you are looking for? import std.stdio; import std.range: iota; import std.algorithm: map, filter, joiner; import std.typecons : tuple; import std.math : sqrt, floor; void main(){ immutable limit = cast(size_t)floor(sqrt(1_000.0)); auto r =

Re: Convert little imperative code to functional coding style

2012-08-10 Thread Nathan M. Swan
On Friday, 10 August 2012 at 18:26:56 UTC, Timon Gehr wrote: Is this what you are looking for? import std.stdio; import std.range: iota; import std.algorithm: map, filter, joiner; import std.typecons : tuple; import std.math : sqrt, floor; void main(){ immutable