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
/*eslint-env es6 */ | |
// Inspired by the paper "A tutorial on the universality and | |
// expressiveness of fold" by Graham Hutton (available at | |
// http://www.cs.nott.ac.uk/~gmh/fold.pdf), implementing some generic | |
// list handling functions in JavaScript in terms of `fold`. | |
// Personally I had an enlightnening moment when I realised the | |
// beautiful interplay of cons lists and foldr during the FP101x | |
// Haskell course. JavaScript's syntax doesn't make this very apparent |
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
(def namedColors { | |
"aliceblue" "#f0f8ff", | |
"antiquewhite" "#faebd7", | |
"aqua" "#00ffff", | |
"aquamarine" "#7fffd4", | |
"azure" "#f0ffff", | |
"beige" "#f5f5dc", | |
"bisque" "#ffe4c4", | |
"black" "#000000", | |
"blanchedalmond" "#ffebcd", |
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
(map (fn [[key value]] [key (count value)]) | |
(group-by identity (take 6000000 (repeatedly #(str (rand-int 10)))))) | |
;; (["9" 598517] ["3" 599137] ["4" 601005] ["8" 601573] ["7" 599983] ["5" 600287] ["6" 600611] ["1" 599224] ["0" 599582] ["2" 600081]) |
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
ack | |
adns | |
ant | |
antibody | |
aria2 | |
asciinema | |
aspcud | |
autoconf | |
autojump | |
automake |
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
.miniprofile { | |
width: 450px; | |
height: 150px; | |
border: 1px solid #aaaaaa; | |
position: relative; /* all other elements styled relative to this section's position */ | |
font-family: Arial; | |
} | |
.headshot { | |
margin: 10px; | |
float: left; |
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
$fullred: #ff0000; | |
body { | |
font-family: Helvetica, Verdana | |
} | |
p { | |
padding: 7px 10px; | |
} | |
#demo { | |
border: 1px solid $fullred; | |
} |
NewerOlder