Skip to content

Instantly share code, notes, and snippets.

@raichoo
Created January 29, 2014 11:23
Show Gist options
  • Save raichoo/8686084 to your computer and use it in GitHub Desktop.
Save raichoo/8686084 to your computer and use it in GitHub Desktop.
Ongoing "Idris to JavaScript" optimization work
/*
recTestHelper : Integer -> Integer -> Integer
recTestHelper n 0 = n
recTestHelper n m = recTestHelper (n * m) (m - 1)
*/
var __IDR__wnurecTesturecTestHelper0swnurecTesturecTestHelper0 = function(me0,me1){
var __var_2 = __IDRRT__EVALTC(me1)
if (__var_2.equals(__IDRRT__ZERO)) {
return me0;
} else {
return new __IDRRT__Cont(function(){
return __IDR__wnurecTesturecTestHelper0swnurecTesturecTestHelper0(__IDRRT__EVALTC(me0).multiply(__var_2),__var_2.subtract(__IDRRT__ONE))
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment