This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getObservableAndNext = (baseUrl, firstPage) => { | |
const subject = new Rx.Subject() | |
const response$ = subject | |
.flatMap(page => { return fetch(baseUrl, page) }) | |
.startsWith(firstPage) | |
const data$ = response.map(response) => { return response.data }) | |
const page$ = response$.map((response) => { return response.nextPage }) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Observable} from 'rx'; | |
import {DOM} from 'rx-dom'; | |
import {toArray, getNodesFromSelector} from './utils'; | |
let interactions_ = { | |
'click': Observable.fromEvent(document.body, 'click') | |
} | |
let mutations_ = DOM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Ractive</title> | |
</head> | |
<body> | |
<div id='container'></div> | |
<script id='todos' type='text/template'> | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module foo | |
def min(list) when length(list) > 0 do | |
Enum.min(list) | |
end | |
def min([]) do | |
[] | |
end | |
def min(list) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Geometry do | |
@moduledoc "geometric formulae" | |
import IO | |
defmodule Quad do | |
@moduledoc "Quadilateral formulae" | |
defmodule Rect do | |
# can't import Geometry | |
# since inner modules are loaded before outer ones |