import { Layout, Txt, makeScene2D } from "@motion-canvas/2d"; import { Direction, beginSlide, createRef, slideTransition, } from "@motion-canvas/core"; import { theme } from "../theme"; const lambdaRules = [ '1. "x": A variable is a character or string representing a parameter, and is a valid lambda term.', '2. "(λ x . t)" is an "abstraction" - a function definition, taking as input the \nbound variable x and returning the lambda term t.', '3. (M N) is an "application", applying a lambda term M with a lambda term N.', ]; export default makeScene2D(function* (view) { const rules = createRef(); view.add( The Lambda Calculus ); yield* slideTransition(Direction.Right); yield* beginSlide("The Lambda Calculus"); for (const rule of lambdaRules) { yield* rules().text(rules().text() + "\n\n" + rule, 1); yield* beginSlide("rule - " + rule); } });