Skip to content

Commit

Permalink
deploy: 9e7135f
Browse files Browse the repository at this point in the history
  • Loading branch information
netpyoung committed Jan 27, 2024
1 parent 09c0f1c commit fb76bc9
Show file tree
Hide file tree
Showing 9 changed files with 340 additions and 342 deletions.
2 changes: 1 addition & 1 deletion ch03/lesson_05.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ <h2 id="심볼은-항상-μœ λ‹ˆν¬ν•˜λ‹€"><a class="header" href="#심볼은-ν•­
;;=&gt; T
</code></pre>
<p>심볼 μ΄λ¦„μœΌλ‘œ λŒ€λ¬Έμžλ‚˜ μ†Œλ¬Έμžλ₯Ό μ‚¬μš©ν•˜λŠ” 것은 λ¬Έμ œκ°€ λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λ‚΄λΆ€μ μœΌλ‘œ, λ¦¬μŠ€ν”„λŠ” 심볼 이름에 μžˆλŠ” λͺ¨λ“  μ•ŒνŒŒλ²³ λ¬Έμžλ“€μ„ 보톡은 λŒ€λ¬Έμžλ‘œ λ°”κΎΈλ©°, λ¦¬μŠ€ν”„ 리더 속에 μžˆλŠ” ν”Œλ ˆκ·Έλ₯Ό μ„€μ •ν•˜μ—¬ 이 κΈ°λ³Έ 섀정을 μ œμ–΄ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
레슨 10 [p 65](λ˜ν•œ 31μž₯ [p 247]μ°Έμ‘°)μ—μ„œ νŒ¨ν‚€μ§€μ— λŒ€ν•΄ λ°°μš΄λ‹€λ©΄, μŠ€νŽ μ€ κ°™μ§€λ§Œ λ™μΌν•˜μ§€λŠ” μ•ŠλŠ” 심볼 이름을 λ§Œλ“€ 수 μžˆμŠ΅λ‹ˆλ‹€. μ§€κΈˆ μ•Œμ•„μ•Ό 할것은 <code>:</code> 둜 ν‘œμ‹œλœ 심볼은 νŠΉλ³„ν•˜κ²Œ μ·¨κΈ‰ν•œλ‹€ λΌλŠ” κ²ƒμž…λ‹ˆλ‹€.</p>
<a href="./lesson_10.html">레슨 10</a> [p 65](λ˜ν•œ 31μž₯ [p 247]μ°Έμ‘°)μ—μ„œ νŒ¨ν‚€μ§€μ— λŒ€ν•΄ λ°°μš΄λ‹€λ©΄, μŠ€νŽ μ€ κ°™μ§€λ§Œ λ™μΌν•˜μ§€λŠ” μ•ŠλŠ” 심볼 이름을 λ§Œλ“€ 수 μžˆμŠ΅λ‹ˆλ‹€. μ§€κΈˆ μ•Œμ•„μ•Ό 할것은 <code>:</code> 둜 ν‘œμ‹œλœ 심볼은 νŠΉλ³„ν•˜κ²Œ μ·¨κΈ‰ν•œλ‹€ λΌλŠ” κ²ƒμž…λ‹ˆλ‹€.</p>
<h2 id="μ‹¬λ³Όλ‘œ-값에-이름-뢙일-수-μžˆλ‹€"><a class="header" href="#μ‹¬λ³Όλ‘œ-값에-이름-뢙일-수-μžˆλ‹€">μ‹¬λ³Όλ‘œ 값에 이름 뢙일 수 μžˆλ‹€.</a></h2>
<p>μ‹¬λ³Όμ˜ 자기 μžμ‹ μ„ ν‘œν˜„ν•˜λŠ” λŠ₯λ ₯ μ—­μ‹œ μœ μš©ν•˜μ§€λ§Œ, λ”μš± 일반적으둜 μ‚¬μš©λ˜λŠ” 곳은 κ°’μ˜ 이름을 뢙일 λ•Œμž…λ‹ˆλ‹€. μ΄λŠ” λ‹€λ₯Έ ν”„λ‘œκ·Έλž˜λ° μ–Έμ–΄μ—μ„œ λ³€μˆ˜μ™€ ν•¨μˆ˜ μ΄λ¦„μ˜ μ—­ν™œμ„ λ§‘μŠ΅λ‹ˆλ‹€. λ¦¬μŠ€ν”„ 심볼은 κ°’μ˜ μ΄λ¦„μ΄λ‚˜, ν•¨μˆ˜μ˜ 이름을 지을 λ•Œ μ‚¬μš©λ©λ‹ˆλ‹€.</p>
<p>λ¦¬μŠ€ν”„μ—μ„œ νŠΉμ΄ν•œ 점 쀑 ν•˜λ‚˜λŠ” 심볼은 ν•¨μˆ˜λž‘ λ³€μˆ˜μ˜ 값을 λ™μ‹œμ— 지닐 수 μžˆλ‹€ λΌλŠ” 점 μž…λ‹ˆλ‹€:</p>
Expand Down
2 changes: 1 addition & 1 deletion ch03/lesson_07.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ <h2 id="defun---이름을-가진-ν•¨μˆ˜-μ •μ˜"><a class="header" href="#defun--
((&gt; the-number the-secret) 'too-high))))
;;=&gt; SECRET-NUMBER
</code></pre>
<p>레슨 3μ—μ„œ <code>let</code>, <code>cond</code>, <code>'</code>(quote의 별칭)λ₯Ό λ‹€λ£¨μ—ˆμŠ΅λ‹ˆλ‹€. 숫자 비ꡐ ν•¨μˆ˜λ“€μ€ κ·Έ μ˜λ―Έκ°€ λͺ…ν™•ν•©λ‹ˆλ‹€.</p>
<p><a href="./lesson_03.html">레슨 3</a>μ—μ„œ <code>let</code>, <code>cond</code>, <code>'</code>(quote의 별칭)λ₯Ό λ‹€λ£¨μ—ˆμŠ΅λ‹ˆλ‹€. 숫자 비ꡐ ν•¨μˆ˜λ“€μ€ κ·Έ μ˜λ―Έκ°€ λͺ…ν™•ν•©λ‹ˆλ‹€.</p>
<p><code>defun</code> 폼은 3개의 인자λ₯Ό κ°€μ§‘λ‹ˆλ‹€:</p>
<ol>
<li>ν•¨μˆ˜μ˜ 이름: <code>secret-number</code></li>
Expand Down
16 changes: 8 additions & 8 deletions ch03/lesson_09.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ <h2 id="valuesλŠ”-μ—¬λŸ¬κ°œμ˜-값을-μƒμ„±ν•˜κ±°λ‚˜-아무것도-μƒμ„±ν•˜μ§€-
;;=&gt; :THAT
</code></pre>
<p>폼의 평가에 μ˜ν•΄ μƒμ„±λœ μ—¬λŸ¬ 라인이으둜 μ–Όλ§ˆλ‚˜ λ§Žμ€ 값이 λ°˜ν™˜λ˜μ—ˆλŠ”μ§€ λ³΄μ•˜μŠ΅λ‹ˆλ‹€. μœ„μ˜ μ˜ˆμ œμ—μ„œ 3개의 <code>values</code> νΌμ—μ„œ 각각 0개, 1개, 2개의 값을 μƒμ„±ν•˜μ˜€μŠ΅λ‹ˆλ‹€.</p>
<p><code>values</code>λŠ” ν•¨μˆ˜μ΄λ©°, λ”°λΌμ„œ 인자λ₯Ό ν‰κ°€ν•©λ‹ˆλ‹€.</p>
<p><code>values</code>λŠ” ν•¨μˆ˜μ΄λ©°, λ”°λΌμ„œ 이의 인수λ₯Ό ν‰κ°€ν•©λ‹ˆλ‹€.</p>
<h2 id="λͺ‡λͺ‡-νŠΉμˆ˜ν•œ-폼은-μ—¬λŸ¬κ°œμ˜-값을-받을-수-μžˆλ‹€"><a class="header" href="#λͺ‡λͺ‡-νŠΉμˆ˜ν•œ-폼은-μ—¬λŸ¬κ°œμ˜-값을-받을-수-μžˆλ‹€">λͺ‡λͺ‡ νŠΉμˆ˜ν•œ 폼은 μ—¬λŸ¬κ°œμ˜ 값을 받을 수 μžˆλ‹€.</a></h2>
<p>μ—¬λŸ¬κ°œμ˜ 값듀을 λ‹€λ£°λ €λ©΄ 무엇을 ν•΄μ•Όν• κΉŒμš”? κ°€μž₯ 기본적인 λ™μž‘μœΌλ‘œλŠ” :</p>
<p>μ—¬λŸ¬κ°œμ˜ 값듀을 λ‹€λ£¨κ³ μž ν•œλ‹€λ©΄ μ–΄λ–»κ²Œ ν•΄μ•Ό ν• κΉŒμš”? κ°€μž₯ 기본적인 κ²ƒλ“€λ‘œλŠ” :</p>
<ol>
<li>각 값듀을 κ°œλ³„ μ‹¬λ³Όλ‘œ λ°”μΈλ“œν•œλ‹€</li>
<li>ν˜Ήμ€ 값듀을 리슀트둜 λͺ¨μ€λ‹€.</li>
<li>각 값듀을 κ°œλ³„ μ‹¬λ³Όλ‘œ λ°”μΈλ“œν•œλ‹€.</li>
<li>ν˜Ήμ€, 값듀을 ν•˜λ‚˜μ˜ 리슀트둜 λͺ¨μ€λ‹€.</li>
</ol>
<p>각 값듀을 κ°œλ³„ μ‹¬λ³Όλ‘œ λ°”μΈλ“œν•˜κΈ° μœ„ν•΄ <code>multiple-value-bind</code>λ₯Ό μ΄μš©ν•©λ‹ˆλ‹€:</p>
<pre><code class="language-lisp">(multiple-value-bind (a b c) (values 2 3 5)
Expand All @@ -219,8 +219,8 @@ <h2 id="λͺ‡λͺ‡-νŠΉμˆ˜ν•œ-폼은-μ—¬λŸ¬κ°œμ˜-값을-받을-수-μžˆλ‹€"><a class=
(list w x y z))
;;=&gt; (:LEFT :RIGHT NIL NIL)
</code></pre>
<h2 id="λͺ‡λͺ‡-폼은-μ—¬λŸ¬κ°’multiple-valuesκ·ΈλŒ€λ‘œ-λ„˜κΈ΄λ‹€"><a class="header" href="#λͺ‡λͺ‡-폼은-μ—¬λŸ¬κ°’multiple-valuesκ·ΈλŒ€λ‘œ-λ„˜κΈ΄λ‹€">λͺ‡λͺ‡ 폼은 μ—¬λŸ¬κ°’(multiple values)κ·ΈλŒ€λ‘œ λ„˜κΈ΄λ‹€.</a></h2>
<p>λͺ‡λͺ‡ 폼은 μƒˆλ‘œμš΄ 값을 μƒμ„±ν•˜λŠ” 것 λŒ€μ‹ μ—, λ§ˆμ§€λ§‰ 값을 본체둜 λ„˜κΉ€λ‹ˆλ‹€. μ˜ˆμ œλŠ” <code>let</code>, <code>cond</code>, <code>defun</code>, <code>lambda</code>의 본체λ₯Ό ν¬ν•¨ν•©λ‹ˆλ‹€.</p>
<h2 id="λͺ‡λͺ‡-폼은-μ—¬λŸ¬κ°œμ˜-값듀을-κ·ΈλŒ€λ‘œ-λ„˜κΈ΄λ‹€"><a class="header" href="#λͺ‡λͺ‡-폼은-μ—¬λŸ¬κ°œμ˜-값듀을-κ·ΈλŒ€λ‘œ-λ„˜κΈ΄λ‹€">λͺ‡λͺ‡ 폼은 μ—¬λŸ¬κ°œμ˜ 값듀을 κ·ΈλŒ€λ‘œ λ„˜κΈ΄λ‹€.</a></h2>
<p>λͺ‡λͺ‡ 폼은 μƒˆλ‘œμš΄ 값을 μƒμ„±ν•˜λŠ” λŒ€μ‹ μ—, 본체의 λ§ˆμ§€λ§‰ 값을 λ„˜κΉ€λ‹ˆλ‹€. μ˜ˆμ œλŠ” <code>let</code>, <code>cond</code>, <code>defun</code>, <code>lambda</code>의 본체λ₯Ό ν¬ν•¨ν•©λ‹ˆλ‹€.</p>
<pre><code class="language-lisp">(let ((a 1)
(b 2))
(values a b))
Expand All @@ -244,8 +244,8 @@ <h2 id="λͺ‡λͺ‡-폼은-μ—¬λŸ¬κ°’multiple-valuesκ·ΈλŒ€λ‘œ-λ„˜κΈ΄λ‹€"><a class="hea
;;=&gt; 7
;;=&gt; 8
</code></pre>
<p>ν•¨μˆ˜μ™€ <code>lambda</code> 본체의 κ²½μš°μ—”, &quot;μ•”μ‹œμ  <code>PROGN</code>&quot;라 λΆˆλ¦¬λŠ” λ¬΄μ–Έκ²ƒμœΌλ‘œλΆ€ν„° λ‹€μˆ˜μ˜ 값이 λ°˜ν™˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μ΄λŠ”, 본체가 λ‹€μˆ˜μ˜ 폼을 포함할 수 있으며, μ΅œμ’…μ μœΌλ‘œ λ§ˆμ§€λ§‰ 폼의 값이 λ°˜ν™˜λ©λ‹ˆλ‹€.</p>
<p>μœ„μ™€κ°™μ€ 행동을 μ›ν• λ•Œ <code>progn</code> μŠ€νŽ˜μ‹€ 폼을 μ΄μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€. <code>(PROGN form1 form2 ... formN)</code> 은 μˆœμ„œλŒ€λ‘œ <code>form1</code>λΆ€ν„° <code>formN</code>κΉŒμ§€ ν‰κ°€ν•˜κ³ , μ΅œμ’…μ μœΌλ‘œ <code>formN</code>의 값을 λ°˜ν™˜ν•©λ‹ˆλ‹€.</p>
<p>ν•¨μˆ˜μ™€ <code>lambda</code> 본체의 κ²½μš°μ—”, &quot;μ•”μ‹œμ  <code>PROGN</code>&quot;라 λΆˆλ¦¬λŠ” λ¬΄μ–Έκ°€λ‘œλΆ€ν„° 닀쀑 값이 λ°˜ν™˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€. λ³Έμ²΄λŠ” λ‹€μˆ˜μ˜ 폼을 포함할 수 있으며, μ΅œμ’…μ μœΌλ‘œ λ§ˆμ§€λ§‰ 폼의 값이 λ°˜ν™˜λ©λ‹ˆλ‹€.</p>
<p><code>progn</code> μŠ€νŽ˜μ‹€ 폼을 μ΄μš©ν•˜μ—¬ μœ„μ™€ 같은 행동을 ν•  수 도 μžˆμŠ΅λ‹ˆλ‹€. <code>(PROGN form1 form2 ... formN)</code> 은 μˆœμ„œλŒ€λ‘œ <code>form1</code>λΆ€ν„° <code>formN</code>κΉŒμ§€ ν‰κ°€ν•˜κ³ , μ΅œμ’…μ μœΌλ‘œ <code>formN</code>의 값을 λ°˜ν™˜ν•©λ‹ˆλ‹€.</p>
<h2 id="짚고-λ„˜μ–΄κ°€κΈ°"><a class="header" href="#짚고-λ„˜μ–΄κ°€κΈ°">짚고 λ„˜μ–΄κ°€κΈ°</a></h2>
<ul>
<li><code>values</code></li>
Expand Down
Loading

0 comments on commit fb76bc9

Please sign in to comment.