myfun {a, b} = a + b;
class MyClass(Object myYetiFun)
void someFunctionOfMyClass()
System#out#println("Now calling the yeti function");
param = {a=10, b=20};
// How to call myYetiFun
with param and get the result (and use it further in Java calls)?
System#out#println(theResult);
// And what is the result of the function is a structure?
// Something like: System#out#println(theResult.value);
end;
myInstance = new MyClass(myfun);
myInstance#
someFunctionOfMyClass();
The easiest way to handle this case is to define the java-class inside a yeti functionmyClassFactory myYetiFun =(class MyClassvoid someFunctionOfMyClass()res = myYetiFun {a = 10, b = 20};Foo#javaMethod(res)end;new MyClass());(myClassFactory myfun)#someFunctionOfMyClass();
No just a new instance which is in almost all cases no performance problem
--
You received this message because you are subscribed to the Google Groups "yeti-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yeti-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.