Going back to the original question,
should not the doc page say?
method cos( Cool:D: --> Cool:D )
On 12/23/20 4:28 PM, Ralph Mellor wrote:
> If a method does not explicitly specify its invocant type, it is set
> to the type of the enclosing class.
But it does not specify an invocant. It just leaves it blank
>
> The `cos` method is declared in the `Cool` class, so that is its
> invocant type.
>
> The doc shows that it's declared in the `Cool` class.
>
> So, the doc is fine as is for the invocant.
I was not asking if you could pick it up by context with
other things written on the page. I was specifically asking
about the definition line.
Once you learn to read them, the definition lines can be really
useful. My problem is that they are often incorrect, which
put a hammer into learning them.
> The returned value is a cosine, which, per the linked doc,
> is a real number. The doc could perhaps show a return value
> of Real:D.
I like it!
This look right to me (but keep in mind I don't know what I am doing)
method cos( Cool:D: --> Real:D )
These two look wrong to me:
method cos()
method cos( --> Cool:D ) or --> Real:D
Thank you for the wonderful explanation.
-T