CurryInfo: rw-data-generator-2.0.0 / RW.Build.optimizeSingleConstructor

definition:
optimizeSingleConstructor :: [a] -> [b] -> [b]
optimizeSingleConstructor xs ys = case xs of
  [_] -> drop 1 ys
  _   -> ys
demand:
arguments 1 2
deterministic:
deterministic operation
documentation:
--- Removes the first element from a list if the first list's length is 1. Otherwise, the list is returned unchanged.
failfree:
(_, _)
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{({:},_) |-> _ || ({[]},_) |-> _}
name:
optimizeSingleConstructor
precedence:
no precedence defined
result-values:
_
signature:
[a] -> [b] -> [b]
solution-complete:
operation might suspend on free variables
terminating:
yes
totally-defined:
reducible on all ground data terms