hoplon / javelin

Spreadsheet-like dataflow programming in ClojureScript.
803 stars 44 forks source link

Added data integrity tests #11

Closed cddr closed 10 years ago

cddr commented 10 years ago

Hi,

I showed your project to the author of cells and he was wondering how much of his "Cells Manifesto" is supported. I started writing some tests to see and wondered if you might be interested in including some or all of them in your test suite.

micha commented 10 years ago

Thanks for the tests! More tests never hurt :)

About the Cells Manifesto. I'm sorry to say that I hadn't seen Cells until after we'd written Javelin, so there wasn't any specific attempt to implement those ideas, but I think that Javelin does more or less operate accordingly.

The Javelin Cell Manifesto

Javelin is a full spreadsheet implementation. That is to say,

There are two primitive functions from which Javelin cells are built: cell and lift. The cell function creates an input cell. The lift function takes one argument, a function, and returns a function which, when applied to arguments that may include cells, returns a formula cell. e.g

(def a (cell 100)) ;; input cell
(def b (cell 200)) ;; input cell
(def c ((lift +) a b 300) ;; formula cell
@c ;;=> 600
(swap! a inc)
@c ;;=> 601

Does this answer the question?

Thanks again for your patch!