Well... after a little thought, I found a solution.

See foo3! in attachment.

Is this form (which would certainly work in Aldor) actually available in
SPAD?

      foo1!(t : MI, n : NNI)(
              bm : MI, N : NNI, k : Z, j : Z, q : Z) : MI ==
          for i in 1..n repeat
              t(k, i) := t(k, i) - q*t(j, i)
          foo(bm, N, k, j, q)

Thank you
Ralf

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
)abbrev package FOO Foo
Foo() : Exports == Implementation where
  Z ==> Integer
  MI ==> Matrix(Integer)
  NNI ==> NonNegativeInteger

  Exports ==> with
      foo3!: (MI, NNI) -> (MI, NNI, Z, Z, Z) -> MI
  Implementation ==> add
      foo(bm : MI, N : NNI, k : Z, j : Z, q : Z) : MI ==
          for i in 1..N repeat
              bm(k, i) := bm(k, i) - q*bm(j, i)
          bm

      foo3!(t : MI, n : NNI) : (MI, NNI, Z, Z, Z) -> MI ==
        (bm : MI, N : NNI, k : Z, j : Z, q : Z) : MI +->
          for i in 1..n repeat
              t(k, i) := t(k, i) - q*t(j, i)
          foo(bm, N, k, j, q)

Reply via email to