h h
See all the help at once.
.
Denotes the top of the stack
#!/bin/bash | |
# To automatically start Emacs in daemon mode if there's no daemon already | |
# running, set: | |
# | |
# export ALTERNATE_EDITOR="" | |
# | |
# Automatically choose how to open Emacs: | |
# 1. If running in interactive terminal use the same terminal. | |
# 2. If there's a frame created, use that frame. | |
# 3. Otherwise create a new frame and use it. |
const EMPTY = null; | |
console.clear(); | |
var naturals$ = Naturals() | |
var firstFive$ = take(5, naturals$) | |
applyEach( | |
n => console.log(n), | |
firstFive$ | |
) | |
// 1 2 3 4 5 |
var ones$ = Repeat(1); | |
var naturals$ = foldPast(sum, 0, ones$) | |
applyEach( | |
n => console.log(n), | |
naturals$ | |
) | |
// 1 2 3 4 5 ... | |
function sum(x, y) { |
function Y(f) { | |
return (function(g) { | |
return g(g); | |
})( | |
function(g) { | |
return (f)(function(arg) { | |
return (g(g))(arg); | |
}); | |
} | |
); |
#!/bin/bash | |
# Build latest version of Emacs, version management with stow | |
# OS: Ubuntu 14.04 LTS | |
# version: 24.5 | |
# Toolkit: lucid | |
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs | |
set -e |
function getFourInARow(numbers) { | |
var xs = partitionEvery(4, numbers); | |
var transducer = compose( | |
mapping(calcProduct), | |
updateIn("maxProduct", max2), | |
updateIn("avg", avg2(xs.length)) | |
); | |
var result = xs.reduce(transducer(id), { maxProduct: 0, avg: 0 }); | |
return result.maxProduct - result.avg | |
} |
function namesSorter (departmentsArray) { | |
return sort( | |
concat(departmentsArray), | |
byLengthAndAlphabetically | |
); | |
} | |
function concat(xs) { return xs.reduce(concat2, []); } | |
function concat2(a, b) { return a.concat(b); } |
(save-window-excursion | |
(package-refresh-contents) | |
(list-packages :no-fetch) | |
(package-menu-mark-upgrades) | |
(package-menu-execute :no-query)) |