I am revising Partition represented by List Integer:

    Rep := List Integer
    rep x ==> (x @ %) pretend Rep
    per x ==> (x @ Rep) pretend %

then I have a function

entries(p: %): List Integer == copy rep p

which is used for elt from Eltable(Integer, Integer):

    elt(p: %, i: Integer): Integer  ==
      i <= 0 => error "elt requires a positive second argument."
      i > #p => error "elt: second argument too large."
      entries(p).i

However, this constructs an infinite loop of calls to elt. Seamingly the elt from List Integer ( as I thinks this could should point to) is not called, but it uses the just defined elt from Partition.

The code is fixed by explicit function call:

elt(entries(p),i)$List(Integer)

Question: What is wrong here? Or if not  wrong, what is my misunderstanding?

--
Mit freundlichen Grüßen

Johannes Grabmeier

Prof. Dr. Johannes Grabmeier,
Köckstraße 1, D-94469 Deggendorf
Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
Fax: +49-(0)-991-2979592

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ab4b9c8a-8861-4ddc-beb8-b26f4d49739f%40grabmeier.net.
  • [frica... 'Prof. Dr. Johannes Grabmeier' via FriCAS - computer algebra system
    • R... Qian Yun
      • ... 'Prof. Dr. Johannes Grabmeier' via FriCAS - computer algebra system
        • ... Grégory Vanuxem
          • ... 'Prof. Dr. Johannes Grabmeier' via FriCAS - computer algebra system
          • ... 'Prof. Dr. Johannes Grabmeier' via FriCAS - computer algebra system
            • ... Grégory Vanuxem
              • ... Grégory Vanuxem
      • ... 'Ralf Hemmecke' via FriCAS - computer algebra system
        • ... Grégory Vanuxem

Reply via email to