Skip to content

Instantly share code, notes, and snippets.

View robotlolita's full-sized avatar
🐴
everything happens so much oh no

Quil robotlolita

🐴
everything happens so much oh no
View GitHub Profile
@robotlolita
robotlolita / clee.md
Last active December 11, 2015 13:39
Clee --- A functional compile-to-JS language for writing CLI programs

Clee

A functional compile-to-JS language for writing beautiful command-line interfaces.

Features

  • Functional (closures, first-class functions, purity)
@paulmillr
paulmillr / type-inference.coffee
Created July 17, 2012 17:39
Damas-Hindley-Milner type inference algorithm in LiveScript
# Algorithm W (Damas-Hindley-Milner) in LiveScript.
# By Paul Miller (paulmillr.com), Public domain.
#
# Based on Robert Smallshire's [Python code](http://bit.ly/bbVmmX).
# Which is based on Andrew's [Scala code](http://bit.ly/aztXwD).
# Which is based on Nikita Borisov's [Perl code](http://bit.ly/myq3uA).
# Which is based on Luca Cardelli's [Modula-2 code](http://bit.ly/Hjpvb).
# Something like that.
prelude = require './prelude'
@robotlolita
robotlolita / livescript-is-beautiful-btw.ls
Last active February 1, 2016 11:20
Guards as nested ternaries vs If/else vs Switch
function attributes(xs, name) {
return is_element(xs)? xs.getAttribute(name)
: is_array(xs)? xs.map(attributes)
: is_sequence(xs)? map(xs, attributes)
: /* otherwise */ raise(TypeError('Not supported.'))
}
// vs
function attributes(xs, name) {
@robotlolita
robotlolita / 0-source.coffee
Last active December 27, 2015 02:32
CoffeeScript parser absurdity
[
a: 1
, b: 2
, c: 3
]
[ a: 1
, b: 2
, c: 3
]