func factorial n .
   r = 1
   for i = 2 to n
      r *= i
   .
   return r
.
func latern a[] .
   for i to len a[]
      tot += a[i]
   .
   res = factorial tot
   for v in a[]
      res /= factorial v
   .
   return res
.
print latern [ 1 2 3 ]
