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 MakeTest(a0, d): | |
var j = 0; | |
return (x) => | |
def r = a0 + d * j; | |
j += 1; | |
return x === r | |
def guess(test): | |
var counter = 0 | |
for var segment in 1..infinity: |
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
#define digit(p) ('0' <= *(p) && *(p) <= '9') | |
char* a[1000]; | |
int n = 0; | |
void fetch(char* p){ | |
while(*p && !digit(p)) p++; | |
if(*p){ | |
char* start = p; | |
while(*p && digit(p)) p++; | |
a[n] = start; n++; | |
if(*p) *p = 0, fetch(++p); |
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
function HomeBind(offset) | |
let cursor=getpos('.') | |
let s0=getline(line('.')) | |
let s1=substitute(s0, "^\\s\\+", "", "") | |
let x=len(s0)-len(s1)+1 | |
if col('.') == x-a:offset | |
let x=1 | |
endif | |
call setpos('.', [cursor[0], cursor[1], x, cursor[3]]) | |
endfunction |
NewerOlder