Re: [eclipse-clp-users] List of Terms to Term

From: Christian Wirth <tyrion_at_...215...>
Date: Tue, 23 Feb 2010 20:02:57 +0100
Works as intended, thx. Didn't think the solution would be that easy.

Matthew Skala schrieb:
> On Tue, 23 Feb 2010, Christian Wirth wrote:
>   
>> The problem i have is, i need to call \+(\+(List)) .. but i get an
>> error:  type error in existing_file([d_role(Player, state), 'd_++'(_403,
>> _478, state), 'd_++'(_403, _478, state), d_cell(_402, _478, state)],
>> [".eco", "", ".ecl", ".pl"], [readable], _786)
>>     
>
> Without taking a position on whether it's a good idea, I think you can
> accomplish your intended effect with this:
>
> list_to_and([],true).
> list_to_and([A|B],(A,C)):-list_to_and(B,C).
>
> List=[write(foo),nl],list_to_and(List,And),\+(\+(And)).
>
>   
Received on Tue Feb 23 2010 - 19:03:09 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET