haskell / haskell/vector

Adding `intersperse` to the API

オープン
#421 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
help-wanted
主要言語
Haskell
スター
400
フォーク
145
PR マージ指標
30日以内にマージされた PR はありません

説明

I would like to suggest the addition of `intersperse :: a -> Vector a -> Vector a` to the API.

I have a prototype that I reuse in my projects, that reads:

```haskell
intercalateVec :: Text -> Vector Text -> Vector Text
intercalateVec sep vector =
if V.null vector
then vector
else V.tail $ V.concatMap (\word -> V.fromList [sep, word]) vector
```

But I would be interested to know if a better implementation is possible.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。