www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - For fun, and executable lame joke

reply btiffin <btiffin myopera.com> writes:
Here's the short version

`["hip", "hip"]`  the hip hip array (or hooray as suits the lame 
joke).

Here's some executable code

```d
void array(string[] a) {
    import std.stdio : writeln;
    foreach(t; a) writeln(t);
}
void main() { D(); }

void
    D() { ["hip", "hip"].array; }
```

Is there a way to make that less codey, more jokey, *but still 
compile and execute the hip hip array*?

Have good,
Blue
May 30 2021
parent Dennis <dkorpel gmail.com> writes:
On Monday, 31 May 2021 at 03:44:15 UTC, btiffin wrote:
 Is there a way to make that less codey, more jokey, *but still 
 compile and execute the hip hip array*?
```D import std; alias cheer = each!writeln; void main() { D(); } void D() { cheer = ["hip", "hip"].array; } ```
May 31 2021