For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| #!/usr/bin/env python | |
| # Look! It's Statementless Python | |
| # Copyright Peter Corbett 2005 | |
| # NO WARRANTY: If you use this for anything important, you're mad! | |
| # Credits to: Ian Jackson for having the idea, Ken Slonneger for | |
| # "Syntax and Semantics of Programming Languages" (large parts this program | |
| # were hand-translated from one of the examples), and fanf, with whom I | |
| # cannot hope to compete. | |
| # Unlike most Python programs, whitespace matters little here. It could | |
| # be a one-liner if you had a monitor long enough. |
| ~ relate(Key, MadeOf, Copper) | |
| ~ relate((Padlock, Spear), MadeOf, Iron) | |
| ~ relate(GoldCoin, MadeOf, Gold) | |
| VAR Inventory = () | |
| - (top) |