git.alexw.nyc home about git garden
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
f<< /lib/array.fs
f" /aoc/input"

\ 4 cells Scratchpad :new structbind Scratchpad buf


\ shitty
0 value tmp 
: scontains ( a u c -- f ) to tmp 0 rot> rfor tmp i c@ = ?dup if nip break then next ;


: dups 4 for buf 4 scontains if break next ; 


\ : solve begin for file :getc buf :, alldiff until ;