Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (<- (father albert barnaby))
- (<- (father albert babar))
- (<- (mother anna barnaby))
- (<- (mother anna babar))
- (<- (father alain bob))
- (<- (father alain ben))
- (<- (mother alice bob))
- (<- (mother alice ben))
- (<- (father ben carla))
- (<- (mother carla dany))
- (<- (parent Parent Child) (father Parent Child))
- (<- (parent Parent Child) (mother Parent Child))
- (<- (ancestor X Z) (parent X Z))
- (<- (ancestor X Z) (parent X Y) (ancestor Y Z))
- (<- (append (list) T T))
- (<- (append (list H T) L2 (list H TR))
- (append T L2 TR))
- (<- (reverse (list) L2 L2 (list)))
- (<- (reverse (list H1 T1) A L2 (list X T2))
- (reverse T1 (list H1 A) L2 T2))
- (<- (reverse L1 L2)
- (reverse L1 (list) L2 L2))
- ;; ancestors
- (?- (ancestor alice dany))
- (?- (ancestor A dany))
- (?- (ancestor alice D))
- (?- (father albert babar))
- (?- (father A babar))
- (?- (father albert B))
- (?- (parent anna babar))
- (?- (parent A babar))
- (?- (parent anna B))
- ;; append
- (?- (append (list 1 (list 2 (list))) (list 3 (list 4 (list))) R))
- (?- (append L1 (list 3 (list 4 (list))) (list 1 (list 2 (list 3 (list 4 (list)))))))
- (?- (append (list 1 (list 2 (list))) L2 (list 1 (list 2 (list 3 (list 4 (list)))))))
- (?- (append (list 1 (list 2 (list))) L2 (list 1 (list 2 (list 3 (list 4 (list)))))))
- (?- (append L1 L2 (list 1 (list 2 (list 3 (list 4 (list)))))))
- ;; reverse
- (?- (reverse (list 1 (list 2 (list 3 (list 4 (list))))) R))
- (?- (reverse R (list 1 (list 2 (list 3 (list 4 (list)))))))
- (?- (reverse X Y))
- (?- (reverse (list 1 (list 2 X)) (list 4 (list 3 Y))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement