CurryInfo: base-3.4.0 / Data.List.diagonal

definition: Info
 
diagonal :: [[a]] -> [a]
diagonal = concat . foldr diags []
 where
  diags []     ys = ys
  diags (x:xs) ys = [x] : merge' xs ys

  merge' []       ys     = ys
  merge' xs@(_:_) []     = map (:[]) xs
  merge' (x:xs)   (y:ys) = (x:y) : merge' xs ys
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
Diagonalization of a list of lists.
Fairly merges (possibly infinite) list of (possibly infinite) lists.

@param xss - lists of lists
@return fair enumeration of all elements of inner lists of given lists
failfree: Info
 ()
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {() |-> {.._#lambda508}}
name: Info
 diagonal
precedence: Info
 no precedence defined
result-values: Info
 {.._#lambda508}
signature: Info
 [[a]] -> [a]
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 yes
totally-defined: Info
 reducible on all ground data terms