import { Layout, Txt, makeScene2D } from "@motion-canvas/2d"; import { Direction, beginSlide, createRef, slideTransition, } from "@motion-canvas/core"; import { theme } from "../theme"; const recursion = ["Y = λ f . (λ x . f (x x)) (λ x . f (x x))"]; export default makeScene2D(function* (view) { const lines = createRef(); view.add( Recursion and Combinators ); yield* slideTransition(Direction.Right); yield* beginSlide("The Lambda Calculus - Church Encoding"); for (const line of recursion) { yield* lines().text(lines().text() + "\n\n" + line, 1); yield* beginSlide("recursion - " + line); } });