Skip to content

Commit

Permalink
document currying (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcho21 authored Feb 11, 2024
1 parent e93083a commit 78713ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
_KALANG: Korean Programming Language_.

- < 0.03 MB.
- Tested with >250 cases
- Written in JavaScript, natively runs on web browsers.
- Tested with >250 cases.
- JavaScript-implemented, which runs natively on web browsers.
- Minimal syntax with Korean keywords.

Try _KALANG_ at [Playground][playground].
Expand Down 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 78713ed

Please sign in to comment.