haskell / haskell/vector

Add insertion functions

未关闭
#76 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
design-shed enhancement
主要语言
Haskell
星标
400
派生
145
PR 合并指标
30 天内没有已合并 PR

描述

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](http://stackoverflow.com/a/28665345/1477667) on StackOverflow; `insertAt` should be particularly simple.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。