Created
October 15, 2017 09:35
-
-
Save anonymous/5328d5a5e34ea7fffb4073cd828f0edc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
import std.algorithm; | |
import std.range; | |
void main() | |
{ | |
// Let's get going! | |
writeln("Hello World!"); | |
// An example for experienced programmers: | |
// Take three arrays, and without allocating | |
// any new memory, sort across all the | |
// arrays inplace | |
int[] arr1 = [4, 9, 7]; | |
int[] arr2 = [5, 2, 1, 10]; | |
int[] arr3 = [6, 8, 3]; | |
sort(chain(arr1, arr2, arr3)); | |
string s = "안녕"; | |
writefln("%s\n%d\n", s, s.length); | |
writefln("%s\n%s\n%s\n", arr1, arr2, arr3); | |
// To learn more about this example, see the | |
// "Range algorithms" page under "Gems" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment