For these exercises you can use the D Online Editor. If you wish to install the D compiler and Standard Library, go to the download page.
Compute the median element of an unsorted integer array. For this, you will have to:
D has a standard library called Phobos. Implement exercise 1 using functions from the std.algorithm package. Use Universal Function Call Syntax (UFCS) for an increase in expressiveness.
Using associative arrays:
struct ColleagueInfo { string telefon; string mail; }
Now go ahead and create your <name, ColleagueInfo> dictionary
ColleagueInfo[string] d;
Inspect the source file. Compile and run the code.
Write a simple templated function that computes the sum of the elements of an array. Your function should be able to work on any numeric type. This is exactly what we demoed in the presentation.