Hacker News new | ask | show | jobs
by ithkuil 5013 days ago

  test := make(chan func (int) int)

  go func() {
    f := <- test 
    fmt.Printf("%d\n", f(10))
  }()

  test <- func(v int) int {
    return v * v
  }