Can anyone recommend a good resource on learning the basics of functional ?

I found:


It's nice to have a resource; but, these resources seem to assume an existing background in FP.

I don't have a background in Lambda Calculus. But, I'm really interested in FP as a way to write code that can be quickly and easily debugged. Any suggestions?

I'm a , Perl, and guy. But, I'll take what I can get.

· · Web · 9 · 5 · 4


> Can anyone recommend a good resource on learning the basics of functional #programming?

> I'm a #Linux #Bash, Perl, and #Rakulang guy. But, I'll take what I can get.

Here are couple of #raku resources that I think are pretty good. I also write most of my Raku code in functional-ish style, and would be happy to answer questions I can.

@codesections Dude! Thanks for the resource.

This is a helpful start. I didn't know sigil-less variables were a thing. For obvious reasons, I thought \var was reference passing notation even in Raku.

I'm going to read this over carefully in a few hours. This is cool.

@profoundlynerdy personally I think from a learning perspective the best way to go is to pick up a language that is designed specifically for functional programming.

after you've spent some time in that, it becomes a lot easier to understand how to apply functional techniques in languages that don't necessarily lean that way out of the box.

(that said, I understand this might not be a realistic suggestion for your present situation)


I've thought about picking up some Haskell, mostly out of curiosity. It's functional. But, that also seems like the long way around.

I really want to apply this to my current Perl code. I do in fact write greenfield Perl scripts all the time.

But, also I occasionally inherit some... less than optimal Perl scripts.It seems to me that if I refactor them with a functional bend I'll send less time debugging during the refactor process. Is that accurate, or have I drank some KoolAid?

@profoundlynerdy yeah, it's fair to say that learning a whole new language is too much; 100% agree with that. but on the other hand, I personally don't know how else to accomplish what you're asking. =)

I don't know anything about perl, but applying functional techniques to greenfield code is a ton easier than adapting legacy code to make it more functional.

@profoundlynerdy what you want to end up with is a kind of "functional core, imperative shell" situation where as much logic as possible is done in pure functions, and the "outer bits" are the ones responsible for all IO, data structure mutation, etc. the shell should be as small as possible because those operations are the ones that are hardest to debug.

but this can require turning a codebase "inside out" which can be hugely disruptive for legacy code.

@technomancy @profoundlynerdy Personally I'm enjoying Haskell! links to some good tutorials.

Personally I'd advise to tackle some non-trivial greenfield project to practice functional programming on, though you don't need to go as extreme as I did.

@profoundlynerdy I personally started from Real World Haskell interactive book

@profoundlynerdy this is not only about coding, but will help you to going deep on the paradigm shift you are about to have on FP:

-- Programming Across Paradigms
By Anjana Vakil, Goto 2017


I would spend some time reading Lessons Learned in Software Testing. Before I ever touched Little Lisper, Learn You a Haskell, etc.,

It’s the part on drinking port in Lessons Learned in Software Testing that I would pay most attention to. You’ve got to learn to read these non-textbooks right.

[with friends]
I also think that setting up an ssh server that just contains text files that your friends cooperatively build from the Little Schemer would not be a bad idea.

@WildKeccak Thanks for the tip!

I bought a copy of *Lessons Learned in Software Testing* at your recommendation. I'll have a look.

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!