Home Explore Blog CI



nushell

3rd chunk of `book/nushell_map_imperative.md`
5bac103e56bb03405eed963dda742d2fa98087f1611ebc940000000100001081
| [`headers`](/commands/docs/headers.md)                                                                                                 | `keys`                               |                                                             |                             |                                                      |
| [`help`](/commands/docs/help.md)                                                                                                       | `help()`                             |                                                             |                             |                                                      |
| [`insert`](/commands/docs/insert.md)                                                                                                   | `dict[\"key\"] = val`                |                                                             | `map.insert({ 20, 130 })`   | `map.insert(\"key\", val)`                           |
| [`is-empty`](/commands/docs/is-empty.md)                                                                                               | `is None`, `is []`                   | `isEmpty`                                                   | `empty`                     | `is_empty`                                           |
| [`take`](/commands/docs/take.md)                                                                                                       | `list[:x]`                           |                                                             |                             | `&Vec[..x]`                                          |
| [`take until`](/commands/docs/take_until.md)                                                                                           | `itertools.takewhile`                |                                                             |                             |                                                      |
| [`take while`](/commands/docs/take_while.md)                                                                                           | `itertools.takewhile`                |                                                             |                             |                                                      |
| [`kill`](/commands/docs/kill.md)                                                                                                       | `os.kill`                            |                                                             |                             |                                                      |
| [`last`](/commands/docs/last.md)                                                                                                       | `list[-x:]`                          |                                                             |                             | `&Vec[Vec.len()-1]`                                  |
| [`length`](/commands/docs/length.md)                                                                                                   | `len`                                | `size`, `length`                                            | `length`                    | `len`                                                |
| [`lines`](/commands/docs/lines.md)                                                                                                     | `split`, `splitlines`                | `split`                                                     | `views::split`              | `split`, `split_whitespace`, `rsplit`, `lines`       |
| [`ls`](/commands/docs/ls.md)                                                                                                           | `os.listdir`                         |                                                             |                             | `fs::read_dir`                                       |
| [`match`](/commands/docs/match.md)                                                                                                     | `match`                              | `when`                                                      |                             | `match`                                              |

Title: Nu Command Equivalents in Other Languages (Continued)
Summary
This section of the Nu command equivalents in other languages continues, covering commands like `headers`, `help`, `insert`, `is-empty`, `take`, `take until`, `take while`, `kill`, `last`, `length`, `lines`, `ls`, and `match`. It provides corresponding functions or methods in Python, Kotlin (Java), C++, and Rust for each Nu command, facilitating translation between Nu and these common programming languages.