Let's allow outgoing ports to contain Elements, like this:
clicks : Input ()
clicks = Input ()
port takeClicks : Signal Element
port takeClicks = constant <| clickable clicks.handle () (spacer 40 40)| import Http | |
| import Graphics.Input as I | |
| import Graphics.Input.Field as F | |
| inp : I.Input F.Content | |
| inp = I.input F.noContent | |
| urlify : String -> String | |
| urlify t = "http://en.wikipedia.org/w/api.php?action=query&format=json&callback=?&titles=" ++ t ++ "&prop=revisions&rvprop=content" |
| module Bot where | |
| import Birdhouse as BH | |
| port updates : Signal { status : String } -- Signal (BH.StatusUpdate {}) | |
| port updates = BH.update . show <~ count (every (10 * second)) |
I hereby claim:
To claim this, I am signing this object:
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Test OTR</title> | |
| </head> | |
| <body></body> | |
| <script> | |
| var start = (new Date()).getTime(); |
| { | |
| "version": "2013-11-10", | |
| "text": "2 / 3 = 0.66667", | |
| "marks": [ | |
| { | |
| "from": { | |
| "line": 0, | |
| "ch": 8 | |
| }, | |
| "to": { |
| digraph { | |
| "Vannevar Bush" -> "Claude Shannon"; | |
| "Claude Shannon" -> "Ivan Sutherland"; | |
| subgraph ailab { | |
| rank = same; | |
| edge[dir=none]; | |
| "Seymour Papert" -> "Marvin Minsky"; |
| #!/usr/bin/env python | |
| import csv | |
| import matplotlib.pyplot as plt | |
| from matplotlib import dates | |
| from datetime import datetime | |
| X = [] | |
| Y = [] |