Download code

Jump to: navigation, search

Back to Look_and_say_sequence_(J)

Download for Windows: single file, zip

Download for UNIX: single file, zip, tar.gz, tar.bz2

conway.ijs

1 loop=: monad : 'loop ((count zipto value) first) y [ echo y'
2 first=: monad : '-.0,2=/\y'
3 count=: dyad : '2-~/\(I.,#)y'
4 value=: dyad : 'y#x'
5 zipto=: dyad : ',x,.y'
6 loop ". stdin ''