Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

D

Visibility

unlisted

Author

legacy-anonymous

Created

2021-03-21T07:17:53.51672Z

Updated

2021-03-21T07:17:53.51672Z

import std.stdio;

struct Sample{
  void function() func1;
  void function() func2;
}

void noth(Sample smpl)() {
  smpl.func1();
  smpl.func2();
}

void main(){
  enum s = Sample(
    {writeln("Hello world1");},
    {writeln("Hello world2");}
  );  
  s.func1();
  s.func2();
  noth!(s)();
}
INFO