| 1 |
-- main.mcl -- |
| 2 |
import "fmt" |
| 3 |
class double($to_str, $x) { |
| 4 |
$name = $to_str($x + $x) |
| 5 |
test [$name,] {} |
| 6 |
} |
| 7 |
include double(func($x) {fmt.printf("%d", $x)}, 42) |
| 8 |
include double(func($x) {fmt.printf("%s", $x)}, "hello") |
| 9 |
-- OUTPUT -- |
| 10 |
Vertex: test[84] |
| 11 |
Vertex: test[hellohello] |