o

ostack

v6860e46library

simple stack implementation in odin

0 stars0 forksUnlicenseupdated 2 years ago
Open repo

ostack

a simple implementation of a stack in odin via a linked data structure

quickstart:

s, _err := make_stack(i32)
defer destroy_stack(s)

stack_push(s, 1)

print_stack(s)

res, ok := stack_peek(s)
if ok {
    fmt.println(res)
}

res, ok = stack_pop(s)
if ok {
    fmt.println(res)
}

res, ok = stack_peek(s)
if !ok {
    fmt.println("stack is empty")
}

res, ok = stack_pop(s)
if !ok {
    fmt.println("stack is empty")
}
Package Info
Version
v6860e46
License
Unlicense
Author
@foldcat
Type
library
Forks
0
Created
2 years ago
Updated
2 years ago
Health
maintained
has releases
has readme
has license
Activity
last 56 weeks