Paste: aoc 5 part 2, sort of

Author: kshi
Mode: factor
Date: Sun, 6 Dec 2020 00:24:34
Plain Text |
: p2 ( ids -- id )
  [ 1024 f <repetition> >array ] dip
  [ t swap rot [ set-nth ] keep ] each
  [ [ nth ] curry ] [ length 1 - ] bi [1,b)
  [ [ 1 + ] [ 1 - ] [ ] tri reach tri@ not and and
  ] find 2nip ;

New Annotation

Summary:
Author:
Mode:
Body: