HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleListLike-4.7.8.4Haskell2010

Data.ListLike.Utils

Utilities for Data.ListLike.ListLike and friends. More functions similar to Data.List but not part of the main typeclass.

Written by John Goerzen, jgoerzen@complete.org

  • 11 values
  • PackageListLike-4.7.8.4
  • Exports11
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUtils.hs
valuezip
  1. :: (ListLike full item, ListLike fullb itemb, ListLike result (item, itemb))
  2. => full
  3. -> fullb
  4. -> result
#

Takes two lists and returns a list of corresponding pairs.

valuezipWith
  1. :: (ListLike full item, ListLike fullb itemb, ListLike result resultitem)
  2. => item -> itemb -> resultitem
  3. -> full
  4. -> fullb
  5. -> result
#

Takes two lists and combines them with a custom combining function

valueunzip
  1. :: (ListLike full (itema, itemb), ListLike ra itema, ListLike rb itemb)
  2. => full
  3. -> (ra, rb)
#

Converts a list of pairs into two separate lists of elements

valuelist :: ListLike full a => b -> (a -> full -> b) -> full -> b
#

List-like destructor (like Data.Maybe.maybe)