I\'m trying to define an anonymous function to do a dot product, I can code this as a private function without any problem but I am struggling with the anonymous function syntax
The less formal but still acceptable approach is:
factorial = fn (0,_) -> 1 (1,_) -> 1 (n, fun) -> n * fun.(n - 1, fun) end
You call it with factorial.(6, factorial) # 720
factorial.(6, factorial) # 720