Timeline for Help me pair my left and right socks!
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 11, 2019 at 8:55 | history | edited | Robin Ryder | CC BY-SA 4.0 |
added 86 characters in body
|
Dec 10, 2019 at 19:22 | history | edited | Robin Ryder | CC BY-SA 4.0 |
added 1037 characters in body
|
Dec 10, 2019 at 15:15 | comment | added | Robin Ryder |
@Giuseppe Thanks! I golfed it 2 bytes further: here, any(p) does what I need, since all entries are non-zero and I just want to check that p is not the empty vector.
|
|
Dec 10, 2019 at 15:14 | history | edited | Robin Ryder | CC BY-SA 4.0 |
added 37 characters in body
|
Dec 10, 2019 at 15:11 | comment | added | Giuseppe |
you can use {} in place of c() and sum(p|1) instead of length(p) to save 2 bytes.
|
|
Dec 10, 2019 at 14:04 | history | edited | Robin Ryder | CC BY-SA 4.0 |
138
|
Dec 10, 2019 at 13:53 | history | answered | Robin Ryder | CC BY-SA 4.0 |