Activity for Andrew Ray
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #292620 | Initial revision | — | 3 months ago |
Answer | — |
A: Fibonacci without consecutive digits [Haskell], 110 bytes ``` haskell c[]=1>0 c(a:b:)|abs(a-b)==1=1<0 c(:b)=c b f=0:1:zipWith(+)f(tail f) h=[g|g<-f,c.map fromEnum.show$g] r=(h!!) ``` Try it online! (more) |
— | 3 months ago |
Edit | Post #292122 |
Post edited: Add description |
— | 5 months ago |
Edit | Post #292122 | Initial revision | — | 5 months ago |
Answer | — |
A: Substring factor [Haskell], 101 95 bytes ``` haskell import Data.List r a=or$map(a?)$(map read$tail.inits=tail.inits=map read$tail.inits=map(a?)$(map read$tail.inits=<<tails(show a))\\[a]` Finally, collapse the list into a single boolean output by using the `or` function, which takes a list of booleans and ret... (more) |
— | 5 months ago |
Edit | Post #292103 | Initial revision | — | 5 months ago |
Question | — |
Towers of DC .:. DC is a reverse-Polish calculator REPL that is available on most Linux distributions. In reverse-Polish notation, you can push values to a stack and then pop those values back off to perform operations, pushing the result back. For example, a minimal DC program to prompt for two inputs, add them, and... (more) |
— | 5 months ago |