Skip to content

Instantly share code, notes, and snippets.

View Print maximum powers of b
#include <stdio.h>
int powers_recursive(int b, int l){
for(int i=0; i<b-1; ++i){
int p = powers_recursive(b, l-1);
printf("%d", p);
return l;
View glinv.hs
This file is a slight extension of Sigfpe's "Quick and dirty reinversion of control":
I only added input capabilities: yieldInput + modification to yield
and of course the lines in imperative (i.e. our re-captured "main loop") which have to do with getting input.