mafintosh / mafintosh/fifo

There is no function that only returns the last node, nor the first

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
57
Forks
15
PR merge metrics
No merged PRs in 30d

Description

there are functions that returns node, that are useful for programmatic iteration (sometimes you need to follow a different order than the one of the iterator function). I tried to start from the last node and end in the first node and there was no other way than having a variable that stores the last pushed node. I think it'd make sense to have a function that gets the last node, so I could iterate from the back to the beginning.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing functions that return queue nodes and trace how the FIFO links are stored. Add accessors for the first and last nodes, then verify that callers can iterate from either end without maintaining their own node reference.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.