http://d.puremagic.com/issues/show_bug.cgi?id=7917
--- Comment #3 from [email protected] 2012-04-16 04:56:08 PDT --- (In reply to comment #2) > import std.algorithm ; > import std.range ; > import std.stdio ; > import std.typecons ; > > double partialSum ( immutable Tuple ! ( int , int , double ) data ) { > return 1.0 ; > } > > void execute ( immutable int numberOfTasks ) { > immutable n = 1000000000 ; > immutable delta = 1.0 / n ; > immutable sliceSize = n / numberOfTasks ; > immutable pi = reduce ! ( ( a , b ) => a + b ) ( 0.0 , map ! ( partialSum ) > ( > map ! ( i => tuple ( i , cast ( int ) sliceSize , cast ( double ) delta ) > ) > ( iota ( numberOfTasks ) ) ) ) ; > } > > int main ( immutable string[] args ) { > execute ( 1 ) ; > return 0 ; > } Maybe you are able to trim away some more stuff from that code, to minimize it some more. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
