https://github.com/tranzystorekk/cons-list
Singly-linked list implementation in Rust
https://github.com/tranzystorekk/cons-list
hacktoberfest linked-list rust rust-library
Last synced: 3 months ago
JSON representation
Singly-linked list implementation in Rust
- Host: GitHub
- URL: https://github.com/tranzystorekk/cons-list
- Owner: tranzystorekk
- Created: 2020-05-07T20:09:36.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-04T09:48:58.000Z (over 2 years ago)
- Last Synced: 2025-04-13T22:45:26.726Z (3 months ago)
- Topics: hacktoberfest, linked-list, rust, rust-library
- Language: Rust
- Homepage:
- Size: 70.3 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linked list
## About
This is a linked list implementation in Rust with some bells and whistles made for training purposes:
* A `Cons` struct that resembles the `head | tail` consing/pattern matching in languages such as Lisp or Haskell
* A `linked_list!` macro for quickly creating a pre-filled list
* IteratorsInspired by the [Too many linked lists](https://rust-unofficial.github.io/too-many-lists/) book.
## `unsafe` code
Internal implementation uses raw pointers for jumping around nodes
to work around Rust's strict lifetime constraints.