tysv
gleam add tysv@1import gleam/float
import gleam/int
import tysv
pub fn main() -> Nil {
let data =
"Vanilla, 23, 0.5
Strawberry, 24, 0.75
Mango, 34, 1.75"
let assert Ok([
#("Vanilla", 23, 0.5),
#("Strawberry", 24, 0.75),
#("Mango", 34, 1.75),
]) =
tysv.row({
use flavor <- tysv.parsed
use price <- tysv.parsed
use kg <- tysv.parsed
#(flavor, price, kg)
})
|> tysv.col(Ok)
|> tysv.col(int.parse)
|> tysv.col(float.parse)
|> tysv.build(data)
}Further documentation can be found at https://hexdocs.pm/tysv.
Development
gleam run # Run the project
gleam test # Run the testsProvenance
All code in this project is written naturally. No AI generation or assistance is used to implement any functionality.
LICENSE
tysv is made available under the terms of the EUPL-1.2 License.