Skip to content

willmartian/hstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hstack

Package Version Hex Docs

A heterogeneous stack data structure for Gleam.

gleam add hstack@1
import hstack
import gleam/function

pub fn main() -> Nil {
    hstack.new()
    |> hstack.push(1)
    |> hstack.push("Hello")
    |> hstack.push(2.5)
    |> hstack.pop
    |> function.tap(echo hstack.get) // --> "Hello"
    |> hstack.push(True)
    |> hstack.size // --> 3

  Nil
}

Further documentation can be found at https://hexdocs.pm/hstack.

Development

gleam test  # Run the tests

About

A heterogeneous stack data structure for Gleam.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages