From 0c476e92e1807928ffb30864126076ef4c6a0821 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Tue, 13 Feb 2024 20:00:02 -0700 Subject: add all the stuff --- src/scenes/reductions.tsx | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/scenes/reductions.tsx (limited to 'src/scenes/reductions.tsx') diff --git a/src/scenes/reductions.tsx b/src/scenes/reductions.tsx new file mode 100644 index 0000000..5ee8961 --- /dev/null +++ b/src/scenes/reductions.tsx @@ -0,0 +1,40 @@ +import { Layout, Txt, makeScene2D } from "@motion-canvas/2d"; +import { + Direction, + beginSlide, + createRef, + slideTransition, +} from "@motion-canvas/core"; +import { theme } from "../theme"; + +const reductions = [ + "1. α - conversion: Renaming of bound variables to avoid name clashes (out of\nscope - assume user knows not to bind variable names already chosen elsewhere).", + "2. β - reduction: Application of a function to an argument.", + "3. η - reduction: Conversion of a function to a point-free form (out of scope).", +]; + +export default makeScene2D(function* (view) { + const rules = createRef(); + + view.add( + + + The Lambda Calculus - Reductions + + + + ); + + yield* slideTransition(Direction.Right); + yield* beginSlide("The Lambda Calculus - Reductions"); + + for (const rule of reductions) { + yield* rules().text(rules().text() + "\n\n" + rule, 1); + yield* beginSlide("reduction - " + rule); + } +}); -- cgit v1.2.3-70-g09d2