I’ve been trying to learn things this week (specifically Haskell). So
far I’ve been through a lot of different moods, and I thought it’d be
handy to write them down so that next time I’m the teacher I can
remember what it’s like to be on the receiving end. I’m not sure I
(and certainly not anyone else) goes through all of these every
time, nor necessarily in the same order which I can’t remember anyway.
These symbols all have no meaning to me, what is even going on here?
If this symbol means that, and this symbol means that, then
combining these two must mean…
OK, so this whole thing does this, which means that these parts must
somehow contribute to doing this. Let’s see…
Argument by analogy
Oh, hold on, what they’re saying is exactly like this other thing from
a different area of my experience. I’ll just pretend it’s the same for
Paralysis of choice
I have a problem, and I’ve been given a bunch of tools, and I don’t
know which to apply.
All I have is a hammer
Well, I understood how to apply a lambda function to a collection with
map, so I’m going to contort this problem until it looks like I need
to apply a lambda function to a collection with
Progress by context
I have no idea what I’m supposed to do here, but I just read a section
on list comprehension so I bet I’m supposed to use
[x | x <- xs]
Confusion of dissimilarity
I have no idea how to turn that map into a comprehension or vice
versa, but I was able to produce each at different times on the same
Joy of simplicity
You know what, it’s true when they say that if it type-checks, it
Disillusion through broken dreams
Oh, off-by-one errors (and rotation of dimensions) still
type-check. This is bullshit.
Reinventing the wheel
So, I need a thing that applies this thing to all those things,
let me write a function
applyFunction :: (a -> b) -> [a] -> [b] that
gives me one of those.
Discovering existing wheels
I have a thing and I need a different thing, let me look in the API
documentation until I find the function that does exactly that.
This error makes no sense, screw the entire city of Glasgow.
Rabbit hole tangents
This error makes no sense, but those words look sufficiently rare to
shove into Google. Ooh, three blog posts, a bug report and a PhD
Trial and (type) error
This error makes no sense, but it’s telling me line 25 is wrong so
I’ll just rewrite line 25. Again. And again.
Stop! Hammock time
I have no idea how to solve this problem, but it’s
lunchtime. [Om nom nom] Ooh, this problem is trivial.
Minimum Viable Enlightenment
I don’t know what I got wrong, but based on the error message I think
I make this change…yes, that works. I don’t know what I got right.
Law of highfalutin words (I)
I wish someone could explain this to people who didn’t learn the word
“monoid” at school.
Law of highfalutin words (II)
Yes, I can help you with that problem, I just solved it myself. You
see, it becomes easier when you realise that these two things
constitute a monoid.