View why-fp-lazy-evaluation.hs
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
next' n x = (x + n / x) / 2 | |
-- [a0, f a0, f(f a0), f(f(f a0)), …] | |
repeat' f a = a : repeat' f (f a) | |
-- get approximations for square root of n by repeat' (next' n) a0 | |
within' (eps a1:a2:rest) | |
| abs(a1 – a2) < eps = a2 | |
| otherwise = within' eps (a2:rest) |
View why-fp-foldtree-substitution-labelstree.hs
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
labelsTree' numberNodes | |
----------------------------------------------------------------- | |
labelsTree' (Node 1 [Node 2 [Node 4 []], Node 5 []]) | |
----------------------------------------------------------------- | |
foldtree' (:) (++) [] (Node 1 [Node 2 [Node 4 []], Node 5 []]) | |
----------------------------------------------------------------- | |
foldnode' (:) (++) [] (Node 1 [Node 2 [Node 4 []], Node 5 []]) | |
----------------------------------------------------------------- | |
(+) 1 (foldnodes' (:) (++) [] [Node 2 [Node 4 []], Node 5 []]) | |
----------------------------------------------------------------- |
View whyfp-higher-order.clj
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
;; Clojure | |
;; fold' f a [] = a | |
;; fold' f a (x:xs) = f x (fold' f a xs) | |
(defn fold' [f a xs] | |
(if (empty? xs) | |
a | |
(f (first xs) (fold' f a (rest xs))))) | |
;; sum'' = fold' (+) 0 |
View phil.go
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
func (host *Host) acceptRequest(philosopher *Philosopher, requestID int, wg *sync.WaitGroup) { | |
go func() { | |
<-host.servingAvailable | |
philosopher.eat() | |
}() | |
go func() { | |
<-philosopher.eatingEnded | |
host.servingAvailable <- "serving available" | |
wg.Done() |
View cloudSettings
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
{"lastUpload":"2018-06-09T06:57:16.462Z","extensionVersion":"v2.9.2"} |
View WindowsDevBoxStarter
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
choco install -y googlechrome | |
choco install -y firefox | |
choco install -y 7zip.install | |
choco install -y notepadplusplus.install | |
choco install -y vlc | |
choco install -y autohotkey.portable | |
choco install -y nodejs.install | |
choco install -y git.install | |
choco install -y skype | |
choco install -y jdk8 |
View index.html
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.7.2/redux.min.js"></script> | |
<script src="https://fb.me/react-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/5.0.5/react-redux.min.js"></script> |
View index.html
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://wzrd.in/standalone/expect@latest"></script> | |
<script src="https://wzrd.in/standalone/deep-freeze@latest"></script> | |
</head> | |
<body> |
View index.html
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://wzrd.in/standalone/expect@latest"></script> | |
<script src="https://wzrd.in/standalone/deep-freeze@latest"></script> | |
</head> | |
<body> |
View index.html
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://unpkg.com/expect/umd/expect.min.js"></script> | |
<script src="https://fb.me/react-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.7.2/redux.min.js"></script> |