definition: |
takeP :: a -> Int -> [a] -> [a] takeP b n xs | n <= 0 = [] | otherwise = case xs of [] -> replicate n b (y:ys) -> y : takeP b (n - 1) ys |
demand: |
no demanded arguments |
deterministic: |
deterministic operation |
documentation: |
--- Takes a number of elements from a list. If the list is shorter than that --- number, fill the rest with a filler. |
failfree: |
(_, _, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,_,_) |-> {[]} || (_,_,{[]}) |-> {:,[]} || (_,_,{:}) |-> {:}} |
name: |
takeP |
precedence: |
no precedence defined |
result-values: |
{:,[]} |
signature: |
a -> Prelude.Int -> [a] -> [a] |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |