Skip to content

Instantly share code, notes, and snippets.

@danprince
Last active December 22, 2015 04:09
Show Gist options
  • Save danprince/6415446 to your computer and use it in GitHub Desktop.
Save danprince/6415446 to your computer and use it in GitHub Desktop.
PN evaluator.
p=function($){for(s="substr",i=e=t=0,_=" ",$+=_;i<$.length;c=$[i],isNaN(c)&&c!=_?(e=0,t=i):0,i++,c==_?++e==3?(x=$[s](t,i).trim().split(_),x.unshift(x.pop()),x=eval(x.join(""))+_,$=$[s](0,t)+x+$[s](i),i=0):0:0){}
return $}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment