definition: |
intersperse :: a -> [a] -> [a] intersperse _ [] = [] intersperse _ [x] = [x] intersperse sep (x:xs@(_:_)) = x : sep : intersperse sep xs |
demand: |
argument 2 |
deterministic: |
deterministic operation |
documentation: |
--- Puts a separator element between all elements in a list. --- --- Example: `(intersperse 9 [1,2,3,4]) = [1,9,2,9,3,9,4]` |
failfree: |
(_, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,{[]}) |-> {[]} || (_,{:}) |-> {:}} |
name: |
intersperse |
precedence: |
no precedence defined |
result-values: |
{:,[]} |
signature: |
a -> [a] -> [a] |
solution-complete: |
operationally complete operation |
terminating: |
yes |
totally-defined: |
reducible on all ground data terms |