Your first graph, step by step
Run a complete example first, then build a small arithmetic graph from Empty. You will use the same connections for functions later.
Open GraphLambda online to follow this tutorial. No local installation is required.
Run the Application example
- Under Examples , choose Application . If the graph is outside the view, select Fit Graph .
- Find the Lambda, the integer 5, Application and Output. The Lambda body adds 1 to its parameter.
- Select Run . This opens a session; it does not immediately run the program to completion.
- Select Step a few times. The dashed focus and the Debugger change as the machine evaluates the graph.
- Select Run to End . Control eventually reads Final value 6 . Use Step Back to revisit an earlier recorded state.
- Select Close Run to return to structural editing.
Build 2 + 3 from Empty
-
Choose
Empty
. In the integer value field below Data, enter
2, then click Integer . Repeat with3. - Add Add from Processes, then Output . Click to add automatically, or drag an item to choose its position.
- Click the output port of 2, then an Add input. Connect 3 to the other Add input. You can also drag an output handle onto an input.
-
Connect Add’s output to Output’s input. Hover a socket for its title; the semantic roles of Add’s inputs are
leftandright. -
Use
Run
, then
Run to End
. Control shows the final value
5.
Empty and incomplete graphs cannot start a run. Check for unconnected required inputs, finish owned body regions and read the diagnostics. An empty socket is a typed hole, not a default value.
Change a value and try again
Close the run, select an integer node and open Type / Properties . Edit Integer Literal Value and select Apply Value . For a Boolean, the value selector applies the change directly. A change that conflicts with the graph’s type or scope constraints is refused.
To remove a node, select it and use Delete Node in the Inspector, or press Delete / Backspace outside a text field. To remove a connection, select its wire and use Disconnect . Undo and Redo restore document snapshots, including layout and region focus.
A second way: start from text
Open the Source Code tab and replace the draft with:
(\x : Int . x + 1) 5
Select Update Flowchart or press Ctrl+Enter (Cmd+Enter also works) while the text field is focused. Successful parsing and type checking replace the graph in one undoable edit. An invalid draft leaves the installed graph unchanged. See Source code for sharing, conditionals and recursion.
Run the editor locally
If you have the GraphLambda source checkout, open a terminal in
Codes/GraphLambda
. With Node.js 22 or newer and npm installed:
npm install
npm run dev --workspace @graphlambda/editor
Open the local URL printed by Vite. The help pages are static documentation and can be hosted independently of that editor.