datacell
9.0
top
← prev up next →

datacellπŸ”— i

Spencer Florence <spencer@florence.io>

(require datacell ) package: datacell

This package gives a simple embedded dataflow language based around the notion of “cells”, similar to the concept of a cell in a Spreadsheet.

A simple example:

Examples:
> (define-cell a0)
> (define-cell b2)
> (define-cell c0)
> (define-cell d(- (expt b2)(* 4ac)))
> d

4

> (set-cell! a1)
> (set-cell! c1)
> d

0

syntax

( define-cell namebody...)

Defines a new cell name, who’s value will be computed by body... . If the body uses any other cells, the then the value of name will be recomputed if the value of those cells change.

A cells value is computed on demand, which is to say that body is only evaluated when the value of named is needed. The value of a cell is almost memoized, meaning body is only evaluated if the current value is not known or a cell used by the body has changed.

syntax

( set-cell! cellbody)

Change the value in cell, which must be an identifier defined by define-cell . The rules for when body is evaluated are the same for definef-cell.

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /