aller à un motif parallèle

package main

import "fmt"

type Figure struct {
	Length int
	Width  int
	Square int
}

const n = 2

func main() {
	ff := []Figure{Figure{1, 2, 0}, Figure{3, 2, 0}, Figure{1, 10, 0}}

	squarec := make(chan Figure, n)

	go func() {
		computeSquare(ff, squarec)
	}()

	send(squarec)
}

func computeSquare(ff []Figure, squarec chan
Worried Worm