« first day (162 days earlier)
← previous day
next day →
last day (1801 days later) »
Nitrodon
12:28 AM
I thought we liked our monadic functions here.
And this is a byte shorter.
(taking the gcd with 9 instead of 3)
9 hours later…
Laikoni
9:42 AM
@BMO why is it necessary?
2 hours later…
BMO
12:04 PM
@Laikoni: Do you mean the space?
(If that's the case, it is because otherwise the length would be divisible by 3 and the
gcd
would always be 3 as well.)
@Nitrodon: Well caught! Not sure how the two of us missed that -.-
4 hours later…
Laikoni
3:49 PM
Yes, I was referring to the space and thought there might be a weird syntax rule which enforces it front of the comment.
4 hours later…
totallyhuman
7:20 PM
damn
Data.Char
doesn't have a swap case function
Wheat Wizard
7:33 PM
@totallyhuman More than half of my code is implementing one. :(
totallyhuman
91 bytes btw
did it on my own and saw that you had
exactly
the same approach
Wheat Wizard
Not
exactly
the same. You are using a list comp instead of a map
You can golf yours I'm pretty sure
totallyhuman
the code might not be the same, but the algorithm is :P
quick 90
:P
BMO
@Laikoni: Luckily no :) Thinking about it now, we should have provided some context..
Wheat Wizard
Yeah, that was my thinking
totallyhuman
7:41 PM
if only there was a pointfree ternary that's short
Wheat Wizard
if'?
I believe that requires imports though
totallyhuman
yeah and that's not short :(
Wheat Wizard
89, you made a pretty simple errror
totallyhuman
oh right
BMO
What kind of chars are allowed in the string?
damn spaces..
Wheat Wizard
7:53 PM
All types
I had a similar answer earlier
BMO
That's annoying :(
3 hours later…
flawr
10:30 PM
@WheatWizard that was a really clever answer:)
Wheat Wizard
Which one?
Laikoni
Another approach for a case swap function:
f x=last$x:do(a,b)<-zip['a'..'z']['A'..];[b|x==a]++[a|x==b]
Though it's 97 bytes for the challenge:
Try it online!
flawr
10:47 PM
@WheatWizard the euler poincaré
Wheat Wizard
Oh. It just seemed like the way to do it.
flawr
It never occured to me to just count the the vertices in the triangulation and divide by 2:)
« first day (162 days earlier)
← previous day
next day →
last day (1801 days later) »
all rooms
Transcript for
Mar
13
Mar '18
14
Mar
15
Of Monads and Men
For discussion about, learning of and golfing in Haskell
codeg...
haskell
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile