donna_stdlib
The Donna standard library.
Overview
donna_stdlib provides the core modules used by Donna projects:
boolfor boolean helpersdictfor small association-list dictionariesfilesfor filesystem accessfloatfor floating-point helpers and math bindingsintfor integer helperslistfor list processingoptionfor optional valuesresultfor fallible valuesshellfor command executionstringfor string processingtimefor monotonic clock measurements
Installation
Add to your donna.toml as a dependency:
[dependencies]
donna = { git = "https://github.com/donna-lang/donna_stdlib", version = ">=0.1.0 and <1.0.0" }
Usage
import donna/string
import donna/list
import donna/time
pub fn main() -> Nil:
let title = string.to_slug("Hello Donna")
let total = list.sum([1, 2, 3])
let started = time.now_ms()
echo title
echo string.from_int(total)
echo string.from_int(time.now_ms() - started)
API
For API Reference visit the generated docs here
Licence
MIT