Why Nostr? What is Njump?
2025-03-16 20:41:36

Tariq on Nostr: I need some #lisp help. I'm stuck on a recursion exercise - have been for 2 days! ...

I need some #lisp help.

I'm stuck on a recursion exercise - have been for 2 days!

We're given a at a structure a list of lists, where each such list is of the form (person mother father) .. and so a lot of these together create a family tree.

I want to write a function lineage x y which returns a list of ancestors from x to y ... eg x, mother of x, father of prev, y .... or NIL if y is not an ancestor of x.

I found this easy in #prolog (I wrote this https://prologbyexample.blogspot.com/2023/02/introducing-recursion.html ) but not #lisp.
Author Public Key
npub1xsrfffw8z907pyv0ulkfqwrcvkfw8qz0rg8y2l37p8gran76m34s2ctf6m