From 78e2e93ae0338f5759254c76430c90f28f6955eb Mon Sep 17 00:00:00 2001 From: liuyanhong Date: Thu, 12 Apr 2018 16:10:53 +0800 Subject: [PATCH] =?UTF-8?q?chapter2=2012=5FSubscripts.md=20=E6=9B=BF?= =?UTF-8?q?=E6=8D=A24.0=E5=89=8D=E8=BF=87=E6=97=B6=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=20(#776)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source-tw/chapter2/12_Subscripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source-tw/chapter2/12_Subscripts.md b/source-tw/chapter2/12_Subscripts.md index 16a66470..e418d44b 100644 --- a/source-tw/chapter2/12_Subscripts.md +++ b/source-tw/chapter2/12_Subscripts.md @@ -100,7 +100,7 @@ struct Matrix { init(rows: Int, columns: Int) { self.rows = rows self.columns = columns - grid = Array(count: rows * columns, repeatedValue: 0.0) + grid = Array(repeating: 0.0, count: rows * columns) } func indexIsValidForRow(row: Int, column: Int) -> Bool { return row >= 0 && row < rows && column >= 0 && column < columns