This file contains hidden or 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
package my | |
/** | |
* This pre-initializes the Console | |
*/ | |
class ConsoleRunner { | |
static void main(String[] args) { | |
def script = args[0] | |
def console = new Console() | |
console.run() |
This file contains hidden or 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 multimethod = (function(_) { | |
var method = function(multi, dispatchValue, method) { | |
multi.methodTable.push([dispatchValue, method]); | |
return method; | |
}; | |
var defaultmethod = function(multi, method) { | |
multi.default = ["default", method]; |
This file contains hidden or 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 optional = (function() { | |
var noneInternal = function() {}; | |
noneInternal.prototype.isNone = function() { return true; }; | |
noneInternal.prototype.isSome = function() { return false; }; | |
noneInternal.prototype.bind = function(fun) { return none(); }; | |
var none = function() { | |
return new noneInternal(); // make fiddling less probable | |
}; | |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace OptionType | |
{ | |
public abstract class Option<T> | |
{ | |
public abstract T Value { get; } |
This file contains hidden or 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
${retIt:newType(java.lang.Iterable)}<${iterable_type}> ${name:newName(retIt)} = ${itbls:newType(com.google.common.collect.Iterables)}.filter(${iterable}, new ${pred:newType(com.google.common.base.Predicate)}<${iterable_type}>() { | |
@Override public boolean apply(${iterable_type} ${input}) { | |
return ${false}; | |
} | |
}); |