CONSTANT: lanternfish $[ "input.txt" ascii file-lines first "," split [ dec> ] map 9 0 tuck [ [ 1 + ] change-nth ] curry each ] : tick ( seq -- ) dup 1 rotate! 8 over nth '[ _ + ] 6 -rot change-nth ; : simulate ( m seq -- n ) [ dup tick ] repeat sum ; 80 lanternfish simulate . 256 lanternfish simulate .