This kind of problem - in my opinion - is where Haskell really shines. While I am a beginner, these sorts of problems usually result in those ahh..ha. moments because they're complexity allows for more practical examples of haskells' strengths as opposed to the simple contrived examples found in most texts. Great Video. PS....loving your Twitch Streams.
There are only 9! = 362,880 permutations of the numbers [1..9]. I just looped through all of them in Python in less than a second (using the permutations function from the itertools module). Writing a permutations function in Haskell would be a nice exercise.
This kind of problem - in my opinion - is where Haskell really shines. While I am a beginner, these sorts of problems usually result in those ahh..ha. moments because they're complexity allows for more practical examples of haskells' strengths as opposed to the simple contrived examples found in most texts. Great Video.
PS....loving your Twitch Streams.
I guess I'm kind of off topic but does anyone know of a good website to watch new series online ?
@Draven Zachariah thank you, I signed up and it seems like a nice service =) I appreciate it !!
@Maximus Deshawn No problem xD
please can we get the magic square full version, I would love to see haskell in full action
How long did it take you to get good like this?
Man, I really love this kinds of videos. You should upload more videos from hackerrank
There are only 9! = 362,880 permutations of the numbers [1..9]. I just looped through all of them in Python in less than a second (using the permutations function from the itertools module). Writing a permutations function in Haskell would be a nice exercise.
import Data.List
permutations [1,2,3,4]
That sneaky wiggle at the end!
8:46 real haskell programmer speaking sweden
unlines adds
to the last line, so you can use putStr instead of putStrLn in function pp.
How would you solve this if you didn't know what a pre-existing configuration for an n x n matrix looked like?
What colorscheme is this?
why not this one?
allMagic = [id,refl] take 4 (iterate rot90 magic)
I think that's the first time I've ever seen where I have _immediately_ understood it. There is hope for us all.
I think that's the first time I've ever seen where I have _immediately_ understood it. There is hope for us all.
@@jbrains you can say that again
@@jbrains I didn't mean that literally
@@michael1 Stupid UA-cam on Android. :P
Yeahh! Numberphile rocks!
You can write prettyPrinter prettier using mapM_:
pp = mapM_ $ print . unwords . map show
Hi this is fresh toadwalker
This is soooooooooooo goood
"we could remove pp"
the video is 13 minutes and 37 seconds long
pp magic
13:37 lol