import { Layout, Txt, makeScene2D } from "@motion-canvas/2d"; import { Direction, beginSlide, createRef, slideTransition, } from "@motion-canvas/core"; import { theme } from "../theme"; const boolE = [ "true = λ t . λ f . t", "false = λ t . λ f . f", "if = λ b . λ x . λ y . b x y", "not = λ b . b false true", "and = λ b . λ c . b c false", ]; export default makeScene2D(function* (view) { const numerals = createRef(); view.add( Boolean Encoding ); yield* slideTransition(Direction.Right); yield* beginSlide("The Lambda Calculus - Boolean Encoding"); for (const bool of boolE) { yield* numerals().text(numerals().text() + "\n\n" + bool, 1); yield* beginSlide("boolean - " + bool); } });