> Hello,
>
> assume I want to write a function that
> nondeterministically yields a
> partition of its input list where a partition of
> a list `l` is defined as a
> list `p` that satisfies the following properties:
>
> concat p = l
> all (not . null) p = True
>
> If I define this in Curry either as
>
> partition l | concat p =:= l & all (not .
> null) p =:= True = p
> where p free
>
> or as
>
> partition l | all (not . null) p =:= True &
> concat p =:= l = p
> where p free
>
> then `partition` fails to terminate at least when
> querying for all
> solutions.
Both examples work ok in MCC (at least in the repository version).
Greetings
Antonio Regidor García
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Di Jun 14 2011 - 09:13:12 CEST