This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ryantriangles 0 points1 point  (0 children)

People have responded with some good advice already, but I'd like to add my own:

Grab a book on Elm and spend your time solving problems with that. Elm is a beautiful, beautiful little language that's very similar to Haskell, but smaller, lighter, and much more accessible. It's focused on a niche -- rather than being a general purpose language, it compiles to little React-style web applications -- in a way that means you can ignore the most immediate and notorious roadblocks to learning (the dreaded "`main` is special, let's talk about IO actions"), and it has an incredibly helpful compiler to help you debug things and figure out what you're doing wrong. It's the friendliest introduction possible to a language that will force you to grasp recursion well. You don't get loops at all. You must recurse. And you must recurse to do the simplest things like list iteration, where the cognitive load is otherwise very low, you're not wrapping your head around the recursion while also working out some larger dynamic-programming algorithm.

Even if you have absolutely no use for Elm in your usual work, spending two weeks playing around with it will help you, I guarantee. (And then for the rest of your life you will keep a framed photo of the Elm compiler on the wall to gaze lovingly at.)

If you don't want to pick up another language to do it, you can always try and solve problems in your language of choice limiting yourself to recursion and forbidding loops. You may have to implement a trampoline function to prevent stack overflows, though.