ELENA-LANG / elena-lang

ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces
https://elena-lang.github.io/
MIT License
227 stars 23 forks source link

An extension with a weak signature #591

Closed arakov closed 7 months ago

arakov commented 11 months ago

It should be possible to declare with a weak signature like this:

extension op
{
   int indexOfElement(element)
   {
      Indexer it := self.indexer();

      while (it.Available)
      {
         if (element == (*it))
            { ^ it.Index };

         it.appendIndex:1;
      };

      ^ -1
   }
}
arakov commented 7 months ago

already fixed