Oops....let me try this

(-> @X) in place of @X in the lisp clause


On 27 November 2016 at 16:38, dean <deangwillia...@gmail.com> wrote:

> In preparation to do a predicate 'minus' I thought I see how to use lisp
> '-' within pilog.
> The first statement works re getting a 100% lisp calculation out to pilog
> but....
> I think I need to pass in pilog variables and apply - to them...unless
> pilog has a -.
> Many apologies if I should know how to do this.
>
>
> : (prove (goal '(   (^ @X (- 4 2))  (equal @A 4)  (equal @B 2)
> )))
> -> ((@X . 2) (@A . 4) (@B . 2))
>    : (prove (goal '(   (^ @X (- @A @B))  (equal @A 4)  (equal @B
> 2)             )))
>  -> NIL
>
>
> On 27 November 2016 at 08:46, dean <deangwillia...@gmail.com> wrote:
>
>> Ok I'll keep trying and thank you for the pointers.
>> Best Regardsd
>> Dean
>>
>> On 27 November 2016 at 07:33, Alexander Burger <a...@software-lab.de>
>> wrote:
>>
>>> Hi Dean,
>>>
>>> > #(prove (goal '(equal 3 @X)   ))
>>>
>>> 'goal' needs a list of clauses:
>>>
>>>    : (prove (goal '((equal 3 @X))))
>>>    -> ((@X . 3))
>>>
>>>
>>> > #: (prove (goal '(     (equal 3 @X) (member @X (1 2 4))   )))
>>> > #-> NIL
>>> > #: (prove (goal '(     (equal 3 @X) (member @X (1 2 3))   )))
>>> > #-> ((@X . 3))
>>>
>>> OK
>>>
>>>
>>> > #(prove (goal '(
>>> > #            (equal @Profit (- @Sales @Cogs))
>>>
>>> Did you define a '-' predicate?
>>>
>>> ♪♫ Alex
>>> --
>>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>>
>>
>>
>

Reply via email to