Slide 36
Slide 36 text
> def choose(first, second, choose_first): !
.. return first if choose_first else second !
.. !
> choose(True, False, True)!
=> True!
> choose(True, False, False)!
=> False
Branching hard, but: Here’s a program I wrote. Normal computers eval condition, execute selected
path.
…so if I have a homomorphic and, or, and not… or just nand, now I can write logic. Branching becomes
a truth table.
click. As a circuit. Circuits easy.