HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduletidal-1.9.5Haskell2010

Sound.Tidal.Utils

  • 16 values
  • Packagetidal-1.9.5
  • Exports16
  • LanguageHaskell2010
  • LicenceGPL-3.0-only
  • SourceUtils.hs
valuemapBoth :: (a -> a) -> (a, a) -> (a, a)
#
valuemapPartTimes :: (a -> a) -> ((a, a), (a, a)) -> ((a, a), (a, a))
#
valuemapFst :: (a -> b) -> (a, c) -> (b, c)
#
valuemapSnd :: (a -> b) -> (c, a) -> (c, b)
#
valuemid :: Fractional a => (a, a) -> a
#

The midpoint of two values

value(!!!) :: [a] -> Int -> a
#

like !! selects nth element from xs, but wraps over at the end of xs

Example1 expression
map ((!!!) [1,3,5]) [0,1,2,3,4,5][1,3,5,1,3,5]
valuenth :: Int -> [a] -> Maybe a
#

Safer version of !! -

valueenumerate :: [a] -> [(Int, a)]
#

enumerate a list of things

Example1 expression
enumerate ["foo","bar","baz"][(1,"foo"), (2,"bar"), (3,"baz")]
valuewordsBy :: (a -> Bool) -> [a] -> [[a]]
#

split given list of a by given single a, e.g.

Example1 expression
wordsBy (== ':') "bd:3"["bd", "3"]