In the past months I have written a series of blog posts on functional programming with a particular (but by no means exclusive) focus on the Raku programming language. If you're curious about functional programming, I think this series might be a good if maybe somewhat challenging and idiosyncratic introduction. It starts with the very basics but covers some more advanced concepts further on.
The suggested reading order would be:
1. "Cleaner code with functional programming" https://wimvanderbauwhede.github.io/articles/decluttering-with-functional-programming/
2. "Roles as Algebraic Data Types in Raku" https://wimvanderbauwhede.github.io/articles/roles-as-adts-in-raku/
3. "List-based parser combinators in Haskell and Raku" https://wimvanderbauwhede.github.io/articles/list-based-parser-combinators/
4. "Function Types" https://wimvanderbauwhede.github.io/articles/function-types/
5. "Encoding types as functions in Raku" https://wimvanderbauwhede.github.io/articles/universal-interpreter-part-1/
6. "A universal interpreter" https://wimvanderbauwhede.github.io/articles/universal-interpreter-part-2/
Not essential but fun: "Everything is a function" https://wimvanderbauwhede.github.io/articles/everything-is-a-function/
@wim_v12e I’m usually working with already existing codes and therefore my first question before learning any new language is: “Can I link to it using a C interface?”
@meisam But my purpose was to explain functional programming, the use of Raku is incidental.
@wim_v12e I gave it a try. The language is really interesting. Although I see how to call the C functions from Raku, I couldn’t figure out how to call Raku from C (how to compile Raku into an object file and link it to another C code).
@wim_v12e Thanks! Will keep an eye on this project. 👀
@wim_v12e Now I am interested! Will definitely give it a try and report my benchmarks back 😁
Fediscience is the social network for scientists.