Skip to content

Instantly share code, notes, and snippets.

@mfikes

mfikes/foo.txt Secret

Created June 27, 2017 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfikes/0caea23d6a40953201f2917632a1e17c to your computer and use it in GitHub Desktop.
Save mfikes/0caea23d6a40953201f2917632a1e17c to your computer and use it in GitHub Desktop.
$ planck -v
Planck 2.5.0
ClojureScript 1.9.655
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Exit: Control+D or :cljs/quit or exit or quit
Results: Stored in vars *1, *2, *3, an exception in *e
cljs.user=> (deftype Partial [f args]
#_=> IFn
#_=> (-invoke [_ & a]
#_=> (apply (apply partial f args) a)))
Evaluating Expression
(function (){
/**
* @constructor
* @implements {cljs.core.IFn}
*/
cljs.user.Partial = (function (f,args){
this.f = f;
this.args = args;
this.cljs$lang$protocol_mask$partition0$ = 1;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
cljs.user.Partial.prototype.call = (function() {
var G__23__delegate = function (self__,a){
var self____$1 = this;
var _ = self____$1;
return cljs.core.apply.call(null,cljs.core.apply.call(null,cljs.core.partial,self__.f,self__.args),a);
};
var G__23 = function (self__,var_args){
var self__ = this;
var a = null;
if (arguments.length > 1) {
var G__24__i = 0, G__24__a = new Array(arguments.length - 1);
while (G__24__i < G__24__a.length) {G__24__a[G__24__i] = arguments[G__24__i + 1]; ++G__24__i;}
a = new cljs.core.IndexedSeq(G__24__a,0,null);
}
return G__23__delegate.call(this,self__,a);};
G__23.cljs$lang$maxFixedArity = 1;
G__23.cljs$lang$applyTo = (function (arglist__25){
var self__ = cljs.core.first(arglist__25);
var a = cljs.core.rest(arglist__25);
return G__23__delegate(self__,a);
});
G__23.cljs$core$IFn$_invoke$arity$variadic = G__23__delegate;
return G__23;
})()
;
cljs.user.Partial.prototype.apply = (function (self__,args22){
var self__ = this;
var self____$1 = this;
return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone.call(null,args22)));
});
cljs.user.Partial.prototype.cljs$core$IFn$_invoke$arity$2 = (function() {
var G__26__delegate = function (a){
var _ = this;
return cljs.core.apply.call(null,cljs.core.apply.call(null,cljs.core.partial,self__.f,self__.args),a);
};
var G__26 = function (var_args){
var self__ = this;
var a = null;
if (arguments.length > 0) {
var G__27__i = 0, G__27__a = new Array(arguments.length - 0);
while (G__27__i < G__27__a.length) {G__27__a[G__27__i] = arguments[G__27__i + 0]; ++G__27__i;}
a = new cljs.core.IndexedSeq(G__27__a,0,null);
}
return G__26__delegate.call(this,a);};
G__26.cljs$lang$maxFixedArity = 0;
G__26.cljs$lang$applyTo = (function (arglist__28){
var a = cljs.core.seq(arglist__28);
return G__26__delegate(a);
});
G__26.cljs$core$IFn$_invoke$arity$variadic = G__26__delegate;
return G__26;
})()
;
cljs.user.Partial.getBasis = (function (){
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",(43394975),null),new cljs.core.Symbol(null,"args","args",(-1338879193),null)], null);
});
cljs.user.Partial.cljs$lang$type = true;
cljs.user.Partial.cljs$lang$ctorStr = "cljs.user/Partial";
cljs.user.Partial.cljs$lang$ctorPrWriter = (function (this__17244__auto__,writer__17245__auto__,opt__17246__auto__){
return cljs.core._write.call(null,writer__17245__auto__,"cljs.user/Partial");
});
(function (){
cljs.user.__GT_Partial = (function cljs$user$__GT_Partial(f,args){
return (new cljs.user.Partial(f,args));
}); return (
new cljs.core.Var(function(){return cljs.user.__GT_Partial;},new cljs.core.Symbol("cljs.user","->Partial","cljs.user/->Partial",(2054900950),null),cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"protocols","protocols",(-5615896)),new cljs.core.Keyword(null,"ns","ns",(441598760)),new cljs.core.Keyword(null,"name","name",(1843675177)),new cljs.core.Keyword(null,"file","file",(-1269645878)),new cljs.core.Keyword(null,"end-column","end-column",(1425389514)),new cljs.core.Keyword(null,"column","column",(2078222095)),new cljs.core.Keyword(null,"factory","factory",(63933746)),new cljs.core.Keyword(null,"line","line",(212345235)),new cljs.core.Keyword(null,"end-line","end-line",(1837326455)),new cljs.core.Keyword(null,"arglists","arglists",(1661989754)),new cljs.core.Keyword(null,"skip-protocol-flag","skip-protocol-flag",(-1426798630)),new cljs.core.Keyword(null,"doc","doc",(1913296891)),new cljs.core.Keyword(null,"test","test",(577538877))],[new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Symbol("cljs.core","IFn","cljs.core/IFn",(-920223129),null),null], null), null),new cljs.core.Symbol(null,"cljs.user","cljs.user",(877795071),null),new cljs.core.Symbol(null,"->Partial","->Partial",(573707661),null),null,(17),(1),new cljs.core.Keyword(null,"positional","positional",(-203580463)),(1),(1),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",(43394975),null),new cljs.core.Symbol(null,"args","args",(-1338879193),null)], null)),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Symbol("cljs.core","IFn","cljs.core/IFn",(-920223129),null),null], null), null),null,(cljs.core.truth_(cljs.user.__GT_Partial)?cljs.user.__GT_Partial.cljs$lang$test:null)])));})()
;
return cljs.user.Partial;
})()
cljs.user/Partial
cljs.user=> (let [p (Partial. + [1 2])]
#_=> (p 2 3))
Evaluating Expression
(function (){var p = (new cljs.user.Partial(cljs.core._PLUS_,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(1),(2)], null)));
return p.call(null,(2),(3));
})()
8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment