output.go 296 B

1234567891011121314151617181920212223242526
  1. package main
  2. var square = func(x Any) Any {
  3. println("Hello, World!")
  4. times(x, x)
  5. return func(y Any) Any {
  6. return id(y)
  7. }(x)
  8. }
  9. // Output ends here!
  10. type Any interface{}
  11. func times(x, y Any) int {
  12. return x.(int) * y.(int)
  13. }
  14. func id(y Any) Any {
  15. return y
  16. }
  17. func main() {
  18. square(10)
  19. }