Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add insertion functions

Open
#76 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
haskell
Domain
data

Research direction

Start by reviewing the three requested function signatures and the linked StackOverflow answer, then inspect the existing Haskell Vector API to identify the relevant implementation entry points. Done means the three insertion functions are provided with the requested types and behavior, including the simple insertAt case.

Written by the indexing model from the issue text.

Description

design-shed enhancement

I doubt these are needed too terribly often, but it might make sense to add them anyway—the usual Vector API doesn't seem to offer any way to implement them efficiently.

  1. insertBeforeFirst :: (a -> Bool) -> a -> Vector a -> Vector a
  2. insertAfterLast :: (a -> Bool) -> a -> Vector a -> Vector a
  3. insertAt :: Int -> a -> Vector a -> Vector a

I've written two fusing versions of (essentially) insertBeforeFirst in an answer on StackOverflow; insertAt should be particularly simple.

Dominant language
Haskell
Stars
401
Forks
145
PR merge metrics
No merged PRs in 30d

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.

More from haskell/vector

All issues in haskell/vector

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.