Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 4
    \$\begingroup\$ Welcome to Programming Puzzles & Code Golf! \$\endgroup\$ Commented Aug 11, 2016 at 3:00
  • \$\begingroup\$ Thanks man! Been a lurker here for a while. Big fan btw, jelly is super cool. Wish I could learn but alas, I don't really understand \$\endgroup\$ Commented Aug 11, 2016 at 15:16
  • 2
    \$\begingroup\$ A general tip: if you're just interested in the length of a list created by a comprehension, you can use sum[1| ... ]. Here we can go further and move the equality test in front of the | and check with or if any of them is true: f x=or[k*2^n+1==x|k<-...,n<-...,2^n>k]. \$\endgroup\$ Commented Aug 11, 2016 at 15:33
  • \$\begingroup\$ Wow. Great tips. I'll definitely revise. \$\endgroup\$ Commented Aug 11, 2016 at 15:50
  • 2
    \$\begingroup\$ If you're interested in learning Jelly, check out the wiki or join the Jelly room. \$\endgroup\$ Commented Aug 11, 2016 at 18:00