Skip to content

Commit

Permalink
document currying
Browse files Browse the repository at this point in the history
  • Loading branch information
wcho21 committed Feb 11, 2024
1 parent 67fb346 commit 2445c03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Defining and calling function:
```
which yields `52`.

Closure:
Closure and currying:
```
๋”ํ•˜๊ธฐ = ํ•จ์ˆ˜(์ˆซ์ž1) {
๊ฒฐ๊ณผ ํ•จ์ˆ˜(์ˆซ์ž2) {
Expand All @@ -92,8 +92,10 @@ Closure:
ํ•˜๋‚˜๋”ํ•˜๊ธฐ = ๋”ํ•˜๊ธฐ(1)
ํ•˜๋‚˜๋”ํ•˜๊ธฐ(42)
๋”ํ•˜๊ธฐ(1)(42)
```
which yields `43`.
which yields `43` twice.



Expand Down
6 changes: 4 additions & 2 deletions docs/README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ kal.execute("์“ฐ๊ธฐ('์‚ฌ๊ณผ')", stdout => stdouts.push(stdout)); // stdout === [
```
๊ฒฐ๊ณผ๋Š” `52`์ž…๋‹ˆ๋‹ค.

ํด๋กœ์ €:
ํด๋กœ์ € ๋ฐ ์ปค๋ง:
```
๋”ํ•˜๊ธฐ = ํ•จ์ˆ˜(์ˆซ์ž1) {
๊ฒฐ๊ณผ ํ•จ์ˆ˜(์ˆซ์ž2) {
Expand All @@ -94,8 +94,10 @@ kal.execute("์“ฐ๊ธฐ('์‚ฌ๊ณผ')", stdout => stdouts.push(stdout)); // stdout === [
ํ•˜๋‚˜๋”ํ•˜๊ธฐ = ๋”ํ•˜๊ธฐ(1)
ํ•˜๋‚˜๋”ํ•˜๊ธฐ(42)
๋”ํ•˜๊ธฐ(1)(42)
```
๊ฒฐ๊ณผ๋Š” `42`์ž…๋‹ˆ๋‹ค.
๊ฒฐ๊ณผ๋Š” ๋‘˜ ๋‹ค `42`์ž…๋‹ˆ๋‹ค.



Expand Down

0 comments on commit 2445c03

Please sign in to comment.