Skip to main content

Timeline for Palindromic Prime Factors

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Jan 18, 2016 at 19:56 comment added Alex A. @GlenO Thanks so much as always! I had initially tried ==[] and it was giving me errors but I tried again now and it's working. I must have messed something up before. ¯\_(ツ)_/¯ The only suggestion I couldn't use is getting rid of first; in this case I have to use first because x is an iterator/collection/something that doesn't have getindex defined.
Jan 18, 2016 at 19:52 history edited Alex A. CC BY-SA 3.0
added 33 characters in body
Jan 18, 2016 at 16:40 comment added Glen O Also, I could be mistaken, but if x is an array, then rather than first(x), just use x[].
Jan 18, 2016 at 16:36 comment added Glen O At a glance, I see a few ways to improve this (just based on basic golfing). Use foldl rather than reduce (they do the same thing, but foldl has defined order and is one byte shorter). Use a direct comparison with an empty structure instead of isempty (I'm not 100% sure what type x is, but if it's a set, for instance, use x==[]). And use (q=join(p)) and then just q in the filter to save two more bytes.
Jan 18, 2016 at 5:24 history answered Alex A. CC BY-SA 3.0