From Sterling and Shapiro's "The Art of Prolog" a procedure to concat two difference lists in O(1) time (from memory):
append_dl(A - B, B - C, A - C).HN user
From Sterling and Shapiro's "The Art of Prolog" a procedure to concat two difference lists in O(1) time (from memory):
append_dl(A - B, B - C, A - C).Prolog. It fits my brain.
I recommend The Python Cookbook: http://oreilly.com/catalog/9780596001674. It's not a reference in the sense that it shows you the language syntax or tells you the details of the standard library, but it shows how experienced Pythonistas do things in a way that might not be obvious to you if you come from a language like C or Java, or until you're Dutch.
"2001: A Space Odyssey" - Stanley Kubrick
"Eat Drink Man Woman" - Ang Lee
"The Ice Storm" - Ang Lee
"Wonder Boys" - Curtis Hanson
"The Apartment" - Billy Wilder
An engineer, a physicist and a mathematician want to catch a lion. The engineer goes to Africa, builds a cage and traps the lion in it. The physicist builds a fence around Africa and pronounces: "I've trapped the lion". The mathematician builds a cage, climbs inside and pronounces: "I am outside".