This directory mirrors the language guidance in the docs. Each basic/ subtree highlights a particular language topic while the stdlib/ folders demonstrate the public helpers that ships with Nimble.
- Control
basic/control/conditionals.nmbβ conditional branches and early exits.basic/control/loops.nmbβfor,while, and range iteration patterns.
- Data
basic/data/collections.nmbβ list manipulation plus map aggregation helpers.
- Functions
basic/functions/recursion.nmbβ recursion patterns expressed in Nimble style.
- Errors
basic/errors/errors.nmbβ structured errors and?propagation.basic/errors/propagation.nmbβ practical file IO example with?.
Each subdirectory highlights the idioms for a single standard library module. Run any sample with cargo run --release -- run examples/<path>.
- io
file_ops.nmbβ basic file lifecycle (write/read/exist).stream_tools.nmbβ bytes/lines operations plus copy helpers.
- json
config.nmbβ configuration extraction and formatting.roundtrip.nmbβ parse/modify/pretty-print JSON payloads.
- list
sort_slice.nmbβ sort/slice helpers.filters.nmbβ filtering, reversing, and push/pop idioms.
- map
keys_values.nmbβ iterate keys and values.merge.nmbβ merging configuration maps.
- math
random_lookup.nmbβ random helpers and lookups.statistics.nmbβ averages and std dev exploration.
- net
http_fetch.nmbβnet.http_getand simple fetch logging.
- os
env.nmbβ inspect runtime arguments.
- path
resolve.nmbβpath.joinand normalization.
- process
pipeline.nmbβ shelling out viaprocess.run.
- regex
extract.nmbβ matches/find helpers.
- string
formatting.nmbβ formatting, uppercasing, and padding.
- time
countdown.nmbβ sleeping + measuring elapsed time.