Nuprl Definition : find-maximal-consecutive

find-maximal-consecutive(g;L) ==
  fst(accumulate (with value ix and list item y):
       eval z = g y in
       let i,x = ix 
       in if x + 1=z  then <i + 1, z>  else ix
      over list:
        tl(L)
      with starting value:
       <1, g hd(L)>))



Definitions occuring in Statement :  tl: tl(l),  hd: hd(l),  list_accum: list_accum,  callbyvalue: callbyvalue,  pi1: fst(t),  int_eq: if a=b  then c  else d,  apply: f a,  spread: spread def,  pair: <a, b>,  add: n + m,  natural_number: $n
FDL editor aliases :  find-maximal-consecutive

Latex:
find-maximal-consecutive(g;L)  ==
    fst(accumulate  (with  value  ix  and  list  item  y):
              eval  z  =  g  y  in
              let  i,x  =  ix 
              in  if  x  +  1=z    then  <i  +  1,  z>    else  ix
            over  list:
                tl(L)
            with  starting  value:
              ə,  g  hd(L)>))



Date html generated: 2015_07_23-PM-00_27_46
Last ObjectModification: 2014_07_23-PM-01_26_51

Home Index