3 ms·
> I do think the semicolon behavior is a bit confusing. I agree. Regarding the named params, the example is: f 3.1415 #name:"I'm using a named pa
by Udo 14y ago
> I do think the semicolon behavior is a bit confusing.
I agree.
Regarding the named params, the example is:
f
3.1415
#name:"I'm using a named param!";
where 3.1415 is an unnamed parameter, and the 3rd line contains the named part. I'm probably showing too many things at once here.
Also, there are definitely a few bugs still to iron out!
- mkdir 14y agoRegarding "3.1415", I was simply passive-aggressively pointing out that if you're referencing pi, you should probably round up to "3.1416". The example itself made sense!
- Udo 14y agoAh, I'm so dense! Sure, there is also "math.pi" as a built-in for that. (And I fixed this grave rounding error) I also discovered a scope problem with the recursion example you gave. Turns out, there is (of course) a major bug in there, thanks for discovering that. It's about the visibility of the "factorial" symbol itself, so the workaround is for now: factorial = { n | factorial = outer.factorial; if(n == 0) { 1 } { n * (factorial (n - 1)) } }; println (factorial 5); At least, until I restart the service (which I don't want to do while everyone is potentially using the tutorial).