Hi Joe,

I just try your solution. Yes 'range/3' is a Pilog predicate hence available for any Pilog rules.

It looks like it returns T if:

@Y =< 18 and @Y >= 0, in the case '(range (0 . 18))' rather than @Y < 18 and @Y > 0. Hence, to get the people under 18 similar to '(< @Y 18)' in Lisp, I need '(range (0 . 17) @Y)'.

Good to know this solution too.

Best,

Eric


Le 14/11/2016 à 13:43, Joe Bogner a écrit :
Hi Alex,

range/3 seems to work as I expected. Should it not be used here?

(be age (Paul 19) )
(be age (Kate 17) )

(be underage (@X)
   (age @X @Y)
   (range (0 . 18) @Y))

(? (underage @X) )
  @X=Kate

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to