8000 GitHub - chrstntdd/immutable_lru: A generic immutable LRU in pure gleam
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chrstntdd/immutable_lru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

immutable_lru

Package Version Hex Docs

gleam add immutable_lru
import immutable_lru

pub fn main() {
  let c =
    immutable_lru.new(10)
    |> immutable_lru.set("1", ["first"])
    |> immutable_lru.set("2", ["second"])
    |> immutable_lru.set("3", ["third"])

  let val =
    c
    |> immutable_lru.get("3")
    |> result.map(with: fn(x) {
      let #(_, val) = x
      val
    })
  // val == ["third"]
}

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

Development

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell

About

A generic immutable LRU in pure gleam

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0