I hereby claim:
- I am edge on github.
- I am redux (https://keybase.io/redux) on keybase.
- I have a public key whose fingerprint is F612 8689 E889 3DC8 49CC ECDD 491A D175 095E A2B1
To claim this, I am signing this object:
export default { | |
run(main, drivers) { | |
let sinkProxies = {} | |
let sources = {} | |
for (let name in drivers) { | |
sinkProxies[name] = new Rx.ReplaySubject(1) | |
sources[name] = drivers[name](sinkProxies[name], name) | |
} |
import System.IO | |
import Control.Monad | |
import Control.Monad.Loops | |
hGetContents' :: Handle -> IO String | |
hGetContents' h = whileM (not <$> hIsEOF h) (hGetChar h) |
import System.IO | |
import System.Environment | |
import Control.Monad | |
import Control.Monad.Loops | |
import Data.List | |
import Data.List.Split | |
import Data.Char | |
import Data.Hex | |
import Data.Monoid |
atan1 0 = 1 | |
atan1 degree = (if even degree then id else negate) 1 / (2 * fromIntegral degree + 1) + atan1 (degree - 1) | |
pigen = (4*) . atan1 | |
main = print $ pigen 10000000 -- 3.1415927535897814 |
atan1t 0 = 1 | |
atan1t degree = (if even degree then id else negate) 1 / (2 * fromIntegral degree + 1) | |
pigen = (4*) . sum . flip take (fmap atan1t [0..]) | |
main = print $ pigen 10000000 -- 3.1415925535897915 |
import System.IO | |
import System.Environment | |
import Control.Monad | |
import Data.Char | |
import Data.List.Split | |
import Data.Hex | |
unwhite :: String -> String | |
unwhite = fmap replace | |
where replace c |
I hereby claim:
To claim this, I am signing this object:
import { Subject, Observable as $ } from 'rx'; | |
import { assign } from 'cycle-monad'; | |
function LabeledSlider({ DOM, props$ }) { | |
/* this is our source for local events | |
* the parent DOM isn't supposed to provide it anyways | |
*/ | |
const hooks = Subject(); | |
const initialValue$ = props$ |
import { Subject, Observable as $ } from 'rx'; | |
let Counter = ({ props$ }) => { | |
const handlePlus$ = Subject(); | |
const handleMinus$ = Subject(); | |
const value$ = props$.init.concat( | |
$.merge(handlePlus$.map(() => 1), handleMinus$.map(() => -1)) | |
).startWith(0).scan((acc, x) => acc + x)); | |
return { |
export default ({ DOM }) => { | |
- Button(DOM.select('.Home')).forEach(() => { | |
- window.location.href = '/'; | |
- }); | |
- Button(DOM.select('.Github')).forEach(() => { | |
- window.location.href = 'https://github.com/edge/cyc'; | |
- }); | |
+ const homeClick$ = DOM.handler(); | |
+ const ghClick$ = DOM.handler(); | |
+ homeClick$.forEach(() => { |