I do admit that this solution does not solve every problem every time. However, with a high enough init_temp it would. I just wanted to minimize the amount of time spent completing each problem.
I have an unsafePerformIO in here for the random cases because I couldn't find documentation on how to do exactly 250 random cases. I'll take a rejection if the unsafePerformIO is bad practice, but I still need to figure out how to do a fixed number of cases which documents the test case (like it "testcase" $ do)
I do admit that this solution does not solve every problem every time. However, with a high enough
init_temp
it would. I just wanted to minimize the amount of time spent completing each problem.Improvement on my previous attempt at code golfing. I forgot to remove whitespace tho :/
I am not good at code golf
Noted. Thank you and my apologizes.
This comment is hidden because it contains spoiler information about the solution
???
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I found a condition where the code would break due to a division by 0 error, so the update code is here: https://gist.github.com/peterjayandrew/d8b1ce7d19eab1f841a188a6e08686f5
Oops, left in the old comment for
nonzeroOrthog
. It's not that naive anymore.Also I forgot to remove the unused
modZipper
function.modZipper f zipper == over value f zipper
I messed up the comment for matchBracket, the example is supposed to be
matchBracket "[+[>.]<]+>[-]" -> ("+[>.]<", "+>[-]")
I have an unsafePerformIO in here for the random cases because I couldn't find documentation on how to do exactly 250 random cases. I'll take a rejection if the unsafePerformIO is bad practice, but I still need to figure out how to do a fixed number of cases which documents the test case (like
it "testcase" $ do
)I accidentally left a bunch of blank spaces at the bottom from when I was absentmindedly holding down the enter key
Forgot to remove unused
Debug.Trace
import.Loading more items...