• Stars
    star
    12
  • Rank 1,547,687 (Top 32 %)
  • Language
    Crystal
  • License
    MIT License
  • Created over 7 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple linked list implementation in Crystal

Crystal Linked List CircleCI

A simple linked list implementation in Crystal

Installation

Add this to a project's shards.yml

dependencies:
  linked_list:
    git: https://github.com/abvdasker/crystal-linked-list.git

Then run shards

Usage

require "linked_list"

list = LinkedList(Int32 | String).new
list.append(1)
list.push(2)
list << "foo"

list.peek        # "foo"
list.pop         # "foo"
list.pop         # 2
list.unshift(1)
list.shift       # 1