list argument problem
- From: Keenlearner <yingun@xxxxxxxxx>
- Date: Fri, 18 Apr 2008 06:12:44 -0700 (PDT)
Hello, if I have the predicate which is unknown at first for its
nameand number of arguments. This predicate is bounded to a variable,
so Iwould like to call this predicate and get the result of the call,
theresult variable always appear at the last argument of the
predicate.for instance,
X = plus(1,2). %
X =.. [Function|Args].
/*
Function = plus
Args = [1, 2]
*/
call(Function,Args, Result).
Thecall/2..6 would append the args of 2,3...and so on to the Function.
Butthe problem is the Args in call predicate is a list and is
unexpectedby call predicate. How can I solve this ? Thanks.
.
- Follow-Ups:
- Re: list argument problem
- From: Jan Wielemaker
- Re: list argument problem
- Prev by Date: Re: call predicate
- Next by Date: Re: call predicate
- Previous by thread: call predicate
- Next by thread: Re: list argument problem
- Index(es):