From 4f9024019d78bebec6926d19da0361587c88bd03 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 10 Mar 2009 13:57:09 -0400 Subject: Increment demo --- demo/prose | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'demo/prose') diff --git a/demo/prose b/demo/prose index a06b1ce5..7555b490 100644 --- a/demo/prose +++ b/demo/prose @@ -205,3 +205,7 @@ listEdit.urp

The central data structure is the rlist, a list whose individual elements are sources, enabling fine-grained mutation. Every rlist is either nil or is a cons cell made up of a source for a string data element, another source to serve as a scratchpad for GUI-based edits to the data element, and a final source that stores the remainder of the list.

The main program provides operations to append to a list and to edit the data stored at any cell of the list. Append is implemented by maintaining a source head, which points to the first list element; and a source tailP, which points to a source rlist where we should place the next appended node.

+ +increment.urp + +

Here's an example where client-side code needs to run more code on the server. We maintain a (server-side) SQL sequence. When the user clicks a button, an AJAX request increments the remote sequence and gets the new value.

-- cgit v1.2.3