title: confusing syntax of array of first class functions in golang
body: <p>I'm new to <code>Go</code>. Confused about the following code:</p>
  <pre><code>  0  package main                                                                                                                                                                                                                               
    1
    2 import &quot;fmt&quot;
    3
    4 type job func(in, out chan interface{})
    5
    6 func main() {
    7     myJobs := []job{
    8         job(func(in, out chan interface{}) {
    9             fmt.Println(&quot;marker 1&quot;)
   10         }),
   11         job(func(in, out chan interface{}) {
   12             fmt.Println(&quot;marker 1&quot;)
   13         }),
   14     }
   15 }
  </code></pre>
  <p>I understand that line 4 defines a new type job. However I'm confused in how it is used on lines 8 and 11. Usually I would define a type like this when I return it from another function. This particular usage is new to me and I don't understand it. On lines 8 and 11. Specifically I don't understand what those lines do. From the context I figured that it is a slice of jobs, but I just don't get the syntax. <code>job</code> is a type, so it looks like what is happening is <code>&lt;type&gt;(func(in, out chan interface{})</code>. I feel like I'm missing something important and obvious. I would appreciate any help with it.</p>