all stats

japi's stats

guessed the most

namecorrect guessesgames togetherratio

were guessed the most by

namecorrect guessesgames togetherratio

entries

round #64

submitted at
0 likes

guesses
comments 0

post a comment


lookandsay.match ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
fst: a, b -> a;;
snd: a, b -> b;;

next:
	nil -> nil;
	ch, nil -> 1, ch, nil;
	ch, (sch, rest): ch = sch -> 2 + fst(count(ch, rest)), ch, next(snd(count(ch, rest)));
	ch, rest -> 1, ch, next(rest);;

count:
	ch, nil -> 0, nil;
	ch, (sch, rest): ch = sch -> 1 + fst(count(ch, rest)), snd(count(ch, rest));
	ch, (sch, rest) -> 0, sch, rest;;

iterate:
	0, _ -> nil;
	n, str -> println(str) then iterate(n - 1, next(str));;

main:
	_ -> print("How many iterations? > ") then iterate(parse(readln(nil)), 1, nil);;

# [https://github.com/japi012/match/]