Timeline for Very Simple Triangles
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | CommunityBot | Commonmark migration | |
| Apr 1, 2015 at 22:34 | history | edited | ankh-morpork | CC BY-SA 3.0 | edited body |
| Mar 25, 2015 at 18:00 | history | edited | ankh-morpork | CC BY-SA 3.0 | 139 -> 132; Returns string instead of printing |
| Mar 25, 2015 at 17:33 | history | edited | ankh-morpork | CC BY-SA 3.0 | 153 -> 139 |
| Mar 25, 2015 at 16:15 | comment | added | nimi | Hints, part II: foldr z["","",""] is foldr1 z, because the list to fold is never empty. Instead of all(==' ') you can use ==" " (<- two spaces in-between), because it is used to remove the empty line in case of n = 1 and here the first line is " ". The first definition of t can be written in a single line: t n|odd.... | |
| Mar 25, 2015 at 10:19 | history | edited | ankh-morpork | CC BY-SA 3.0 | putStrLn -> putStr |
| Mar 25, 2015 at 0:46 | comment | added | ankh-morpork | @nimi Thanks for your hints! Using them, I was able to golf my original solution to 179 bytes. By reconsidering my approach, I was also able to reduce my solution to 155 Bytes. | |
| Mar 25, 2015 at 0:40 | history | edited | ankh-morpork | CC BY-SA 3.0 | Golfed first attempt. Found better approach. |
| Mar 24, 2015 at 18:35 | comment | added | nimi | Some hints for golfing: (mod n 2)==0 is even n or better use odd n and swap the then and else part. concat.take(div n 2).repeat is take(4*div n 2).cycle because all list elements are of length 4. Assign short names to functions with long names, e.g. z=zipWith - then use z. You can kick out a few spaces ...repeat""else[.... | |
| Mar 24, 2015 at 10:56 | review | First posts | |||
| Mar 24, 2015 at 12:03 | |||||
| Mar 24, 2015 at 10:51 | history | answered | ankh-morpork | CC BY-SA 3.0 |