|
definition: |
lines :: String -> [String]
lines [] = []
lines as@(_:_) = let (l, bs) = splitLine as in l : lines bs
where splitLine [] = ([], [])
splitLine (c:cs) = if c == '\n' then ([], cs)
else let (ds, es) = splitLine cs
in (c : ds, es)
|
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
| Breaks a string into a list of lines where a line is terminated at a newline character. The resulting lines do not contain newline characters. |
|
failfree: |
_ |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{({[]}) |-> {[]} || ({:}) |-> {:}}
|
|
name: |
lines |
|
precedence: |
no precedence defined |
|
result-values: |
{:,[]}
|
|
signature: |
[Char] -> [[Char]] |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
reducible on all ground data terms |