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

From: Matthew Skala <mskala_at_...203...>
Date: Tue, 23 Feb 2010 13:47:25 -0500 (EST)
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)).

-- 
Matthew Skala, postdoctoral researcher, Universities of Toronto and Waterloo
mskala_at_...203...    mskala@...205...    mskala@...206...
Received on Tue Feb 23 2010 - 19:22:11 CET

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST