Timeline for "DDoouubbllee ssppeeaakk!!"
Current License: CC BY-SA 4.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | Community Bot |
Commonmark migration
|
|
| Aug 1, 2019 at 15:33 | comment | added | Arnauld | @PabloLozano Added. :-) | |
| Aug 1, 2019 at 15:33 | history | edited | Arnauld | CC BY-SA 4.0 |
added an alternate version
|
| Aug 1, 2019 at 15:22 | comment | added | Pablo Lozano |
Another option with replace and 26 characters: s=>s.replace(/./gs,'$&$&')
|
|
| Jul 31, 2019 at 12:30 | comment | added | Oliver | @KevinCruijssen Yeah, I agree :-) | |
| Jul 31, 2019 at 12:29 | comment | added | Kevin Cruijssen |
@Oliver I don't think it's valid. My 05AB1E would have a few 1 byte solutions in that case. Default I/O for a string is either, well.. a string, or a list/array/stream of characters / single-char strings. ["aa","bb","cc"] is a list of strings however, neither a string nor list of characters of itself. Adding a join or flatten it to a list of characters is valid, but would have to be counted towards the byte-count.
|
|
| Jul 31, 2019 at 12:25 | comment | added | Oliver |
@KevinCruijssen The join('') should take care of that. On second thought, that may be augmenting the output in a non-standard way so that may not be valid.
|
|
| Jul 31, 2019 at 12:22 | comment | added | Kevin Cruijssen |
@Oliver Won't that result in something like ['a','b','c'] -> ['aa','bb','cc'] instead of the intended ['a','a','b','b','c','c'], though?
|
|
| Jul 31, 2019 at 12:19 | comment | added | Oliver |
Would s=>s.map(c=>c+c) not work?
|
|
| Jul 31, 2019 at 10:47 | comment | added | Arnauld | @NahuelFouilleul Good catch. Thanks! | |
| Jul 31, 2019 at 10:47 | history | edited | Arnauld | CC BY-SA 4.0 |
fixed the 2nd version
|
| Jul 31, 2019 at 10:43 | comment | added | Nahuel Fouilleul |
s=>s.replace(/./gs,c=>c+c) so that . also matches newlines
|
|
| Jul 31, 2019 at 10:05 | history | answered | Arnauld | CC BY-SA 4.0 |