CurryInfo: base-3.4.0 / Control.Search.SetFunctions.choose

definition: Info
 
choose :: Eq a => Values a -> (a, Values a)
#ifdef __KICS2__
choose (Values vs) = (x, Values xs)
#else
choose (Values _ vs) =
  (x, Values (if null xs then Nothing else Just (head xs)) xs)
#endif
 where x  = foldr1 (?) vs
       xs = delete x vs
demand: Info
 argument 2
deterministic: Info
 possibly non-deterministic operation
documentation: Info
 
Chooses (non-deterministically) some value in a multiset of values
and returns the chosen value and the remaining multiset of values.
Thus, if we consider the operation `chooseValue` defined by

    chooseValue x = fst (choose x)

then `(set1 chooseValue)` is the identity on value sets, i.e.,
`(set1 chooseValue s)` contains the same elements as the
value set `s`.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,{Values}) |-> {(,)}}
name: Info
 choose
precedence: Info
 no precedence defined
result-values: Info
 {(,)}
signature: Info
 Prelude.Eq a => Values a -> (a, Values a)
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 yes
totally-defined: Info
 possibly non-reducible on same data term