Hoogle Search

Within LTS Haskell 24.33 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. (+~) :: Num a => ASetter s t a a -> a -> s -> t

    diagrams-lib Diagrams.Prelude

    Increment the target(s) of a numerically valued Lens, Setter or Traversal.

    >>> (a,b) & _1 +~ c
    (a + c,b)
    
    >>> (a,b) & both +~ c
    (a + c,b + c)
    
    >>> (1,2) & _2 +~ 1
    (1,3)
    
    >>> [(a,b),(c,d)] & traverse.both +~ e
    [(a + e,b + e),(c + e,d + e)]
    
    (+~) :: Num a => Setter' s a    -> a -> s -> s
    (+~) :: Num a => Iso' s a       -> a -> s -> s
    (+~) :: Num a => Lens' s a      -> a -> s -> s
    (+~) :: Num a => Traversal' s a -> a -> s -> s
    

  2. (++) :: [a] -> [a] -> [a]

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

  3. (+=) :: ArrowXml a => a b XmlTree -> a b XmlTree -> a b XmlTree

    hxt Text.XML.HXT.Arrow.XmlArrow

    convenient op for adding attributes or children to a node usage: tf += cf the tf arrow computes an element node, and all trees computed by cf are added to this node, if a tree is an attribute, it is inserted in the attribute list else it is appended to the content list. attention: do not build long content list this way because += is implemented by ++ examples:

    eelem "a"
    += sattr "href" "page.html"
    += sattr "name" "here"
    += txt "look here"
    
    is the same as
    mkelem [ sattr "href" "page.html"
    , sattr "name" "here"
    ]
    [ txt "look here" ]
    
    and results in the XML fragment: <a href="page.html" name="here">look here</a> advantage of the += operator is, that attributes and content can be added any time step by step. if tf computes a whole list of trees, e.g. a list of "td" or "tr" elements, the attributes or content is added to all trees. useful for adding "class" or "style" attributes to table elements.

  4. (+|) :: [a] -> [a] -> [a]

    leancheck Test.LeanCheck

    Lazily interleaves two lists, switching between elements of the two. Union/sum of the elements in the lists.

    [x,y,z,...] +| [a,b,c,...]  =  [x,a,y,b,z,c,...]
    

  5. (+|) :: [a] -> [a] -> [a]

    leancheck Test.LeanCheck.Core

    Lazily interleaves two lists, switching between elements of the two. Union/sum of the elements in the lists.

    [x,y,z,...] +| [a,b,c,...]  =  [x,a,y,b,z,c,...]
    

  6. (+|) :: [a] -> [a] -> [a]

    leancheck Test.LeanCheck.Error

    Lazily interleaves two lists, switching between elements of the two. Union/sum of the elements in the lists.

    [x,y,z,...] +| [a,b,c,...]  =  [x,a,y,b,z,c,...]
    

  7. type family (xs :: [k]) ++ (ys :: [k]) :: [k]

    relude Relude.Extra.Type

    Concatenates type-level lists.

    >>> :kind! '[ 'Just 5, 'Nothing] ++ '[ 'Just 3, 'Nothing, 'Just 1]
    '[ 'Just 5, 'Nothing] ++ '[ 'Just 3, 'Nothing, 'Just 1] :: [Maybe
    Natural]
    = '[ 'Just 5, 'Nothing, 'Just 3, 'Nothing, 'Just 1]
    
    >>> :kind! '[] ++ '[ 'Just 3, 'Nothing, 'Just 1]
    '[] ++ '[ 'Just 3, 'Nothing, 'Just 1] :: [Maybe Natural]
    = '[ 'Just 3, 'Nothing, 'Just 1]
    
    # 91 "srcReludeExtra/Type.hs"

  8. (++) :: [a] -> [a] -> [a]

    relude Relude.List.Reexport

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  9. type family (as :: [k]) ++ (bs :: [k]) :: [k]

    vinyl Data.Vinyl.TypeLevel

    Append for type-level lists.

  10. data ((b :: [a]) ++ (c :: [a])) (d :: [a])

    first-class-families Fcf

    List catenation.

    Example

    >>> data Example where Ex :: a -> Example  -- Hide the type of examples to avoid brittleness in different GHC versions
    
    >>> :kind! Ex (Eval ([1, 2] ++ [3, 4]) :: [Natural])
    Ex (Eval ([1, 2] ++ [3, 4]) :: [Natural]) :: Example
    = Ex [1, 2, 3, 4]
    

Page 12 of many | Previous | Next