Skip to content

Instantly share code, notes, and snippets.

View steveorsomethin's full-sized avatar

Steve McGuire steveorsomethin

  • Free Agent
  • Boston, MA
View GitHub Profile
function Observable(subscribe) {
this._subscribe = subscribe;
}
const of = (v) => new Observable(observer => {
return observer.next(v);
});
Observable.prototype = {
map(f) {
use std::num::{One};
trait Observer<A> {
fn next(&mut self, val: A);
}
trait Observable<A> {
fn subscribe<'r, N: Observer<A>>(&mut self, observer: N);
#[inline]