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 helpersiofor standard input, output, and error helperslistfor list processingoptionfor optional valuespathfor path manipulation helpersresultfor 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.3.1 and <1.0.0" }
Usage
import donna/io
import donna/int
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()
io.println(title)
io.println(int.to_string(total))
io.println(int.to_string(time.now_ms() - started))
API
For API Reference visit the generated docs here
Licence
MIT