Skip to content

Instantly share code, notes, and snippets.

View myzone's full-sized avatar

Slava Goldenshteyn myzone

View GitHub Profile
@myzone
myzone / behavior.rs
Last active March 11, 2016 00:07
Behavior
mod behavior {
pub trait Behavior {
type T;
type S;
type R: IntoIterator<Item=Self::S>;
fn apply(&self, &Self::T, &Self::S) -> Self::T;
fn react(&self, &Self::T, &Self::S) -> Self::R;
}