definition: |
takeWhile :: (a -> Bool) -> [a] -> [a] takeWhile _ [] = [] takeWhile p (x:xs) = if p x then x : takeWhile p xs else [] |
demand: |
argument 2 |
deterministic: |
deterministic operation |
documentation: |
--- Returns longest prefix with elements satisfying a predicate. |
failfree: |
(_, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,{[]}) |-> {[]} || (_,{:}) |-> {:,[]}} |
name: |
takeWhile |
precedence: |
no precedence defined |
result-values: |
{:,[]} |
signature: |
(a -> Bool) -> [a] -> [a] |
solution-complete: |
operation might suspend on free variables |
terminating: |
yes |
totally-defined: |
reducible on all ground data terms |