Skip to content

Commit 7ce29fd

Browse files
Update KCL docs (#614)
YOYO NEW KCL DOCS!! Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e5a704b commit 7ce29fd

File tree

11 files changed

+11
-23
lines changed

11 files changed

+11
-23
lines changed

content/pages/docs/kcl-lang/python-cheat-sheet.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ layout: manual
1919
| **Map a Collection** | `list(map(lambda x: 2 * x, arr))`<br/>OR<br/>`[2 * x for x in arr]` | `map(arr, f = fn(@x) { return 2 * x })` |
2020
| **Reduce a Collection** | <pre><code>result = 0<br/>for item in arr:<br/> result += 2 * item</code></pre>OR<pre><code>from functools import reduce<br/>result = reduce(lambda sum, item: sum + 2 * item, arr, 0)</code></pre> | The accumulator parameter must be named `accum`. <pre><code>result = reduce(arr,<br/> initial = 0,<br/> f = fn(@item, accum) &lbrace; return accum + 2 * item &rbrace;)</code></pre> |
2121
| **Array Concatenation** | `[1, 2, 3] + [4, 5, 6]` | `concat([1, 2, 3], items = [4, 5, 6])` |
22+
| **Integer Division** | `8 // 3` | `floor(8 / 3)` |
2223
| **Raise to a Power** | `2**5` | `2^5`<br/>OR<br/>`pow(2, exp = 5)` |
2324
| **Vector Addition** | <pre><code>a = [1, 2, 3]<br/>b = [4, 5, 6]<br/>result = [x + y for x, y in zip(a, b)]</code></pre>OR<pre><code>import numpy as np<br/>a = np.array([1, 2, 3])<br/>b = np.array([4, 5, 6])<br/>result = a + b</code></pre> | <pre><code>a = [1, 2, 3]<br/>b = [4, 5, 6]<br/>result = vector::add(a, v = b)</code></pre> |
2425
| **Logical Operators** | Short circuits.<br/>`a and b`<br/>`a or b`<br/>`not a` | Does not short circuit. See [docs](/docs/kcl-lang/arithmetic).<br/>`a & b`<br/>`a \| b`<br/>`!a` |

content/pages/docs/kcl-samples/manifest.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -447,21 +447,6 @@
447447
"main.kcl"
448448
]
449449
},
450-
{
451-
"file": "main.kcl",
452-
"pathFromProjectDirectoryToFirstFile": "multi-axis-robot/main.kcl",
453-
"multipleFiles": true,
454-
"title": "Robot Arm",
455-
"description": "A 4 axis robotic arm for industrial use. These machines can be used for assembly, packaging, organization of goods, and quality inspection processes",
456-
"files": [
457-
"globals.kcl",
458-
"main.kcl",
459-
"robot-arm-base.kcl",
460-
"robot-arm-j2.kcl",
461-
"robot-arm-j3.kcl",
462-
"robot-rotating-base.kcl"
463-
]
464-
},
465450
{
466451
"file": "main.kcl",
467452
"pathFromProjectDirectoryToFirstFile": "pdu-faceplate/main.kcl",
-2 Bytes
Loading
-1 Bytes
Loading
-594 Bytes
Loading
-84 Bytes
Loading
1 Byte
Loading

content/pages/docs/kcl-std/functions/std-clone.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

content/pages/docs/kcl-std/functions/std-helix.md

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

content/pages/docs/kcl-std/functions/std-sketch-planeOf.md

Lines changed: 5 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)