social.coop is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Fediverse instance for people interested in cooperative and collective projects. If you are interested in joining our community, please apply at https://join.social.coop/registration-form.html.

Administered by:

Server stats:

487
active users

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 prologbyexample.blogspot.com/2 ) but not #lisp.

prologbyexample.blogspot.com7 - Introducing Recursion Recursion is an important technique in many programming languages, especially declarative languages like prolog. It enables elegant and ...