Timeline for The one counting challenge to rule them all!
Current License: CC BY-SA 4.0
23 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 30, 2020 at 13:07 | history | edited | Arcahv | CC BY-SA 4.0 |
deleted 2 characters in body
|
Jun 27, 2020 at 10:55 | history | edited | Arcahv | CC BY-SA 4.0 |
added 268 characters in body
|
Jun 27, 2020 at 10:30 | comment | added | Arcahv | @Laikoni Ok, wow. It seems like you can always drain bytes from code! And thanks for the tips!! | |
Jun 27, 2020 at 10:29 | history | edited | Arcahv | CC BY-SA 4.0 |
added 17 characters in body
|
Jun 27, 2020 at 10:26 | comment | added | Trebor |
@Laikoni Of course, you can also infix o d w to get d#w . So c(filter(head x#)x) . Saves 2 more bytes.
|
|
Jun 27, 2020 at 8:52 | comment | added | Laikoni |
1+max(y l)(y r) can be 1+y l`max`y r . a=w.(`replicate`r) can further be shortened to a n=w$r<$[1..n] . All together 410 bytes: Try it online!. Sorry for all those pings.
|
|
Jun 27, 2020 at 8:32 | comment | added | Laikoni |
a=w.flip replicate r can be a=w.(`replicate`r) . You can use infix notation for the main function a : a 0 _ _=1;a n e q= ... becomes (0!_)_=1;(n!e)q= ... . [let A in B | C] can be wrote without the in : [B | C, let A] .
|
|
Jun 27, 2020 at 8:09 | comment | added | Laikoni |
snd$partition p x is filter(not.p)x . Instead of using not , we can negate o : from o d w=any(\p->and[...==...|...]) we go to o d w=all(\p->or[.../=...|...]) .
|
|
Jun 27, 2020 at 7:44 | comment | added | Laikoni |
partition=<<e.(!!0) can be further shortened to partition=<<e.head . (sum$zipWith...) can be sum(zipWith...) . There's an extra space in c [] .
|
|
Jun 27, 2020 at 7:36 | comment | added | Laikoni | Just in case you haven't seen them yet: Here's a collection of Tips for golfing in Haskell. | |
Jun 27, 2020 at 6:05 | history | edited | Arcahv | CC BY-SA 4.0 |
added 58 characters in body
|
Jun 27, 2020 at 5:39 | comment | added | Trebor | pointfree.io does seem to be a good way to shorten Haskell code! | |
Jun 27, 2020 at 3:45 | history | edited | Arcahv | CC BY-SA 4.0 |
added 149 characters in body
|
Jun 27, 2020 at 3:24 | history | edited | Arcahv | CC BY-SA 4.0 |
deleted 23 characters in body
|
Jun 27, 2020 at 3:01 | history | edited | Arcahv | CC BY-SA 4.0 |
added 66 characters in body
|
Jun 27, 2020 at 3:00 | comment | added | Arcahv | Indeed that's 3 more bytes... I accidentally included an extra space. | |
Jun 27, 2020 at 2:42 | history | edited | Arcahv | CC BY-SA 4.0 |
added 14 characters in body
|
Jun 27, 2020 at 2:39 | comment | added | Arcahv |
@ovs Thanks! Two more bytes can be saved by making y point-free: j e=partition=<<e.(!!0)
|
|
Jun 26, 2020 at 21:38 | comment | added | ovs |
Nice first answer! You can write your splitOffFirstGroup function slightly shorter as j e y=partition(e$y!!0)y .
|
|
Jun 26, 2020 at 20:14 | history | edited | Arcahv | CC BY-SA 4.0 |
added 105 characters in body
|
Jun 26, 2020 at 20:08 | history | edited | Arcahv | CC BY-SA 4.0 |
added 105 characters in body
|
Jun 26, 2020 at 20:05 | review | First posts | |||
Jun 26, 2020 at 21:21 | |||||
Jun 26, 2020 at 20:01 | history | answered | Arcahv | CC BY-SA 4.0 |