| 1 | struct MyStruct { |
| 2 | text string |
| 3 | } |
| 4 | |
| 5 | struct App {} |
| 6 | |
| 7 | fn pre_send[T, N](app T, params N) { |
| 8 | send(params, app) |
| 9 | } |
| 10 | |
| 11 | fn send[T, N](params T, app N) { // app now is second argument |
| 12 | println(params) |
| 13 | } |
| 14 | |
| 15 | fn test_main() { |
| 16 | params := MyStruct{'hello'} |
| 17 | app := App{} |
| 18 | |
| 19 | pre_send(app, params) |
| 20 | assert true |
| 21 | } |
| 22 |