Skip to content

Instantly share code, notes, and snippets.

View julien-truffaut's full-sized avatar

Julien Truffaut julien-truffaut

View GitHub Profile
We need a questionnaire model that can:
* Support different answer types
* Support validations that can depend on the answers to other questions
* Support different forms of rendering (e.g. the questionnaire needs to be renderered using HTML, JSON, etc.) with / without the answers
* Answers need to be persisted and recovered from persistence. JSON persistence is acceptable.
* Support having conditional parts of the questionnaire based on previous answers
Needless to say, it must be typesafe
Different types of answers are things like: Dates, Addresses, Lists of Addresses, Phone Numbers, Lists of Phone Numbers, Strings, Enumerated values, etc.
@djspiewak
djspiewak / streams-tutorial.md
Created March 22, 2015 19:55
Introduction to scalaz-stream

Introduction to scalaz-stream

Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.

The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca