Oh it isn’t that hard, it might seem complicated because of all the parenthesis and strange keywords like cons, but it’s actually just a matter of getting used to it. It’s a fun language to learn recursion for example.
It becomes a lot simpler when you learn the patterns for building recursive functions, at one point, you don’t even look at the whole function because you just think of the parts.
I started by making a function that looks like that:
This function just returns the list of numbers from 1 to 15, that's what it does because the compute function just returns whatever is n. Then I simply filled compute with my conditions.
define is used to define variables and functions,
cons is used to build a list from a head and a queue (that's not hard to understand but it definetely requires some practice and research,
Oh it isn’t that hard, it might seem complicated because of all the parenthesis and strange keywords like cons, but it’s actually just a matter of getting used to it. It’s a fun language to learn recursion for example.
It becomes a lot simpler when you learn the patterns for building recursive functions, at one point, you don’t even look at the whole function because you just think of the parts.
I started by making a function that looks like that:
This function just returns the list of numbers from 1 to 15, that's what it does because the
compute
function just returns whatever isn
. Then I simply filledcompute
with my conditions.define
is used to define variables and functions,cons
is used to build a list from a head and a queue (that's not hard to understand but it definetely requires some practice and research,let*
allows to define local variablesWhat a legend! I wasn't expecting an explanation, but it's highly appreciated!
Looks interesting, and after your explanation, it does not look as complicated, I might give it a try someday💪
And yeah, most languages seem a bit overwhelming at first.
Thanks! Feel free to ping me for help if you try to get into it and feel stuck.
Thank you! I will if I get into it :)