make :: Int -> [MyElement];
make n = input $ output $ jMake n;
Here, the output function just acts to cast MyList to JObject.
Then, the basic input function can be used.
The list implementation of input is quite flexible, and will handle a
number of common Java collections, arrays, iterators, etc.
Thanks
Rich
> --
> You received this message because you are subscribed to the Google Groups "CAL Language Discussion" group.
> To post to this group, send email to cal_la...@googlegroups.com.
> To unsubscribe from this group, send email to cal_language...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cal_language?hl=en.
>
>
The input function always takes a JObject argument, just as output
always returns a JObject.
input :: JObject -> a;
output :: a -> JObject;
There are a number of ways to write the code here, but they all end up
doing the same work.
The following should work:
input (castEListToJObject (getEReferences (getEClass book)));
Here castEListToJObject is needed to make the types match up in CAL.
Thanks
Rich