and btw, you cannot really program literate as Knuth meant it in javascript. The problem is that you cannot rearrange your code blocks freely:
module.exports = {
CONST: CONST, // = "ant"
foo: foo,
#!/bin/sh | |
python -m SimpleHTTPServer & | |
SERVER_PID=$! | |
sleep 1 | |
echo started server | |
curl 127.0.0.1:8000 | |
kill $SERVER_PID |
Could we use https://github.com/phadej/jsstana to make rules in eslint,
e.g. rule in https://github.com/nzakas/eslint/blob/master/lib/rules/no-eq-null.js could be expressed as
module.exports = function(context) {
"use strict";
$ = require "./doc.coffee" | |
doc = new $.Doc | |
doc.section "Bacon.js" | |
doc.logo() | |
doc.text """ | |
A small functional reactive programming lib for JavaScript. | |
Turns your event spaghetti into clean and declarative feng shui bacon, by switching |
"use strict"; | |
var _ = require("lodash"); | |
var Bacon = require("baconjs"); | |
function Scheduler() { | |
this.time = 0; | |
this.events = []; | |
} |
module SysF | |
%default total | |
-- type definition | |
bool : Type | |
bool = (x : Type) -> x -> x -> x | |
true : bool | |
true t a b = a |
module p where | |
open import Agda.Primitive | |
ℕ : (ℓ : _) → Set (lsuc ℓ) | |
ℕ ℓ = {x : Set ℓ} → (z : x) → (s : x → x) → x | |
zero : ∀ {ℓ} → ℕ ℓ | |
zero = λ z s → z |
type ID = forall x. x -> x | |
id' :: ID | |
id' x = x | |
id'' :: ID | |
id'' = id' id' |
type List a = forall b . (a -> b -> b) -> b -> b | |
nil :: forall a. List a | |
nil _ = id | |
cons :: forall a. a -> List a -> List a | |
cons h t f = f h . t f | |
listmap :: forall a b. (a -> b) -> List a -> List b | |
listmap f l = l defineme nil |