Last active
October 26, 2020 17:15
-
-
Save tangentstorm/11a5f7c7e9688e0e380622655045278b to your computer and use it in GitHub Desktop.
my answer for https://www.youtube.com/watch?v=5p8--DMRO2U
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c =: '01' ([: +/ =)"0 _ ] NB. count 0 and 1 | |
t =: {{(*/ <:/"1 c\ y) *. =/c y }} NB. the two rules | |
g =: {{'01' {~ #:i.2^2*y}} NB. generate the numbers | |
f =: {{y {~ I.t"1 y}} NB. filter by t | |
f g 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment