소스 검색

SVI Add ch06

SVI 1 개월 전
부모
커밋
bc0f9326c5
1개의 변경된 파일8개의 추가작업 그리고 7개의 파일을 삭제
  1. 8 7
      doc/part01/ch06.md

+ 8 - 7
doc/part01/ch06.md

@@ -1,11 +1,12 @@
-# Chapter 6. Let vs Var
+# Глава 6. let и var
 
 A variable can not only be introduced via var but also via let:
+
+```nim
  let points = @[Point(x: 2, y: 4)]
  resetPointsToOrigin points
-Such a let variable cannot be changed after its initialization so
-resetPointsToOrigin points is rejected too.
-As programs grow larger, the enforced discipline about what can be mutated
-helps both compilers and human programmers to reason about the code. At
-the same time, the rules are not overly restrictive and don’t prevent the
-development of classical or novel algorithms.
+```
+
+Such a let variable cannot be changed after its initialization so resetPointsToOrigin points is rejected too.
+
+As programs grow larger, the enforced discipline about what can be mutated helps both compilers and human programmers to reason about the code. At the same time, the rules are not overly restrictive and don’t prevent the development of classical or novel algorithms.