Question: is there a function like accumulate in haskell in maple

search start from a, b, c, ... for each sequence if input a,b,c,d,e,f,g,h,i,j,k

is there a function like accumulate in haskell in maple instead of using for loop?

would like to search something if found, then return the length of it searched from the starting position

when start from a search a from b to g whether is a,  if find , return the length from c to the found position,

when start from b search b from c to h whether is b,  if find , return the length from c to the found position

....

then save the length into a list

a b c d e f g

   b c d e f g h

      c d e f g h i

         d e f g h i j

            ef g h i j k

 

Please Wait...