extra
extra copied to clipboard
Extra Haskell functions
As I can see from source code `repeatedly` applize `f` only to non empty lists: ```haskell repeatedly :: ([a] -> (b, [a])) -> [a] -> [b] repeatedly f [] =...
closes #93
# What A variant of `groupOn` that pairs each group with its key. Compare: ```haskell groupOn :: Eq b => (a -> k) -> [a] -> [ [a]] groupOnKey ::...
flipped foldMap: `(Foldable t, Monoid c) => t a -> (a -> c) -> c` It is similar to `whenJust`, but more pure, while `whenJust` is inherently effectful since it...
Hello, the `notNull` defined in `Data.List.Extra`, as a composition of `not` and `null`, is defined only for list, however, de `null` function works with any `Foldable`, so I think that...
Consider adding applyWhen from [here](https://hackage.haskell.org/package/ghc-8.10.1/docs/Util.html#v:applyWhen).
Sometimes you want the function which takes two arguments and ignores the first. You can write that as: ``` flip const \_ x -> x const id \_ -> id...
Useful for adapting with libraries that provide utilities expecting particular function shapes, but not others.
We should deprecate `replace` and `splitOn`, and create alternatives for them that take a `NonEmpty` instead of crashing at runtime when their first parameter is empty.
``` [1 of 4] Compiling TestUtil ( test/TestUtil.hs, /code/other-haskell/extra/dist-newstyle/build/x86_64-linux/ghcjs-8.4.0.1/extra-1.6.17/t/extra-test/build/extra-test/extra-test-tmp/TestUtil.js_o ) test/TestUtil.hs:10:6: error: Conflicting exports for ‘isWindows’: ‘module X’ exports ‘X.isWindows’ imported from ‘System.FilePath’ at test/TestUtil.hs:33:1-27 (and originally defined in ‘System.FilePath.Posix’)...