definition:
|
getFirstId :: String -> String
getFirstId [] = ""
getFirstId (c:cs)
| isAlpha c = takeWhile isIdChar (c:cs)
| c == '(' = let bracketid = takeWhile (/=')') cs
in if all (`elem` infixIDs) bracketid
then bracketid
else ""
| otherwise = ""
|
demand:
|
argument 1
|
deterministic:
|
deterministic operation
|
documentation:
|
-- get the first identifier (name or operator in brackets) in a string:
|
failfree:
|
_
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{({[]}) |-> {[]} || ({:}) |-> _}
|
name:
|
getFirstId
|
precedence:
|
no precedence defined
|
result-values:
|
{:,[]}
|
signature:
|
String -> String
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|