Hello,

I would like to ask for help. I'm building a recommendation system
framework and I'm having doubts about the optional arguments. I would like
to pass parameters through functions and I don't want to declare it during
the passage. Here is an example I have written to serve as an illustration
of the idea.

type Object
   function Object(;featureOne = 4, featureTwo = 20)
       this = new();
       println(featuresOne);
    end
end

type Example
    method::Function

    function Example(;params=[])
        this = new();
        x = Object(params)
    end
end

x = Example(;params = ["featureOne => 1"]);

Thanks!!!
Filipe Braida

Reply via email to