« first day (242 days earlier)      last day (1721 days later) » 

9:34 PM
HMC: Write a XOR function Bool -> Bool -> Bool without using any imports or build-in functions from Prelude. (Based on this CMC by Adám)
Template: Try it online!
@H.PWiz has a 26 byte answer, my best attempt so far is 30 bytes.
Oh well, I found a 25 byte answer
 
Just found the 25, It's very similar to my 26 but slightly less interesting
I had the patterns the other way around
 
Yeah, I think just found your 26 byte answer
Actually I think my 30 byte approach was also kind of interesting: Try it online!
 
9:50 PM
Couldn't find any solution
@Laikoni what the heck
How can you use let there??
 
@Laikoni Interestingly the restricted import doesn't let you write [False..True] directly
 
I saw the fact that an empty let works as catch-all pattern guard first in an answer by H.PWiz.
 
Nope
Mar 9 at 9:36, by Potato44
I just found out that you can use `let` instead of `otherwise` in a guard.

fac n|n==0=1|let=n*fac(n-1)

https://tio.run/##y0gszk7Nyfn/Py0xWSGPS0GhJs/W1sDWEMTKSS2xzdMCSmjk6RpqcnHlJmbmKdgqFBRl5pUoqCiAdJj//w8A
 
Is it in the tips?
 
No, but it would only be useful for restricted source
 
9:56 PM
I know, but I wouldn't start a separate Tips for restricted source challenges in Haskell :)
 
i've got 23
 
@Potato44 please consider adding it to the tips for golfing in Haskell!
 
@H.PWiz It does, it's just that False.. appears to be parsed as one token. Inserting a spaces fixes the issue.
 
Yeah, just noticed now...
 
(also works in things like [0|_<-[0..5],let])
 
10:01 PM
@xnor So back to the drawing board it is ...
 
 
1 hour later…
11:29 PM
@Laikoni Finally found it. Now for the other logical gates ...
 
11:48 PM
I have it too :)
 

« first day (242 days earlier)      last day (1721 days later) »