Skip to content

Instantly share code, notes, and snippets.

@tanitta
Created December 3, 2015 17:03
Show Gist options
  • Select an option

  • Save tanitta/5f1ffd961c48855595fb to your computer and use it in GitHub Desktop.

Select an option

Save tanitta/5f1ffd961c48855595fb to your computer and use it in GitHub Desktop.
load_delegate
import armos;
import std.stdio;
class Hoge{
void func(void delegate() f){
f();
}
}
class TestApp : ar.BaseApp{
auto hoge = new Hoge;
void mouseMoved(int x, int y, int button){
hoge.func((){"hoge".writeln;});
}
}
void main(){ar.run(new TestApp);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment