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
module.exports = deepEqual; | |
var assert = require('assert'); | |
function deepEqual ($1, $2) | |
{ | |
try | |
{ | |
assert.deepEqual($1, $2); | |
return true; |
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
// see full package: https://github.com/StreetStrider/repl.js |
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
#lang racket | |
(define (@map fn L) | |
(foldl | |
(lambda (i A) | |
(append A (list (fn i))) | |
) | |
empty | |
L | |
) |
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
#lang racket | |
(define (@filter fn L) | |
(foldl | |
(lambda (i A) | |
(if (fn i) | |
(append A (list i)) | |
A | |
) | |
) |
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
XX( -1, UNKNOWN, "unknown error") \ | |
XX( 0, OK, "success") \ | |
XX( 1, EOF, "end of file") \ | |
XX( 2, EADDRINFO, "getaddrinfo error") \ | |
XX( 3, EACCES, "permission denied") \ | |
XX( 4, EAGAIN, "resource temporarily unavailable") \ | |
XX( 5, EADDRINUSE, "address already in use") \ | |
XX( 6, EADDRNOTAVAIL, "address not available") \ | |
XX( 7, EAFNOSUPPORT, "address family not supported") \ | |
XX( 8, EALREADY, "connection already in progress") \ |
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
function Locale () | |
{ | |
var locale = Object.create(Locale.prototype); | |
locale.ns = {}; | |
return locale; | |
} |
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
var isArray = Array.isArray; | |
module.exports = function strip (ast) | |
{ | |
ast = ast.filter(filterOnlyLeaves(like)); | |
ast = ast.map(mapOnlyBranches(strip)); | |
return ast; | |
} |
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
#!/usr/bin/env node | |
var | |
exec = require('child_process').exec, | |
path = require('path'); | |
var | |
is_reverse = ~ process.argv.indexOf('reverse'); | |
sync = require('./sync.list'), | |
LEFT_PREFIX = '~', |
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
function Ensure (check, action) | |
{ | |
return function ensurer (data) | |
{ | |
return capture(() => check(data)) | |
.then(so => | |
{ | |
if (! so) | |
{ | |
if (! action) |
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
var log = console.log | |
var input = 'LLLAABBBBBEE' | |
log(input) | |
var c = compress(input) | |
log(c) | |
var d = decompress(c) |
OlderNewer