Thanks to visit codestin.com
Credit goes to bntr.itch.io

Visual Lambda is a graphical environment for exploring Lambda calculus using Bubble Notation. It represents lambda expressions as colorful 2D structures and animates beta-reduction steps smoothly, making complex logic easy to follow.

Lambda animation

GitHub: https://github.com/bntre/visual-lambda


Demo

See Factorial 3 constructed and reduced to 6 in this dynamic video: https://www.youtube.com/watch?v=aRgu8S3Pnb8
Factorial 3


Bubble notation basics

Notation basics


Controls

The workspace contains lambda terms and text labels. You can drag any of them with the mouse. The last touched term becomes selected. Selected subterms are highlighted with a red outline.

You can modify a whole term or any selected subterm using the right toolbar. Hover over buttons to see tooltips and keyboard shortcuts.

Use the Play button at the bottom to perform a beta-reduction step. Each term keeps its own reduction history, so you can undo and redo steps.

To create an application, drag one term onto another subterm (the target area is highlighted in dark red). Note: the dropped term loses its reduction history - make a copy first if you want to preserve it.

Lambda mode and reduction strategy can be changed in the left menu.

For the full keyboard reference, see controls.txt.


Puzzles

In the menu, select the puzzles workspace to try the Lambda Puzzles challenge. Your goal is to unlock each golden coin hidden inside a lambda term.

See the above GIF for a quick example of solving a puzzle.


Developer Console

Use the browser console to add items or manage your workspace:

> function vl(...args) { document.getElementById("game_drop").contentWindow.postMessage(args, "*") }
> vl('addItem', "MULT 2 (\\f x. f (f x))")
> vl('clearWorkspace')
> vl('saveWorkspace', "combinators3")
> vl('loadWorkspace', "combinators3")

Check the expression library for predefined terms.


Background

Development log

Comments

Log in with itch.io to leave a comment.

really cool! the circles are tricky to understand at first but once you start to get used to them it's cool to see them do their thing. 

why is there no download button?

I thought the only geek who would want to download would go to github

ok