select-tagged-indices-aux(P;tg;L) ==
  rec-case(L) of [] => 
n.[] | fst::rest => r.if P fst
  then 
n.[<n, tg fst> / (r (n + 1))]
  else 
n.(r (n + 1))
  fi 
Definitions : 
list_ind: rec-case(a) of [] => s | x::y => z.t[x; y; z], 
nil: [], 
ifthenelse: if b then t else f fi , 
cons: [car / cdr], 
pair: <a, b>, 
lambda:
x.A[x], 
apply: f a, 
add: n + m, 
natural_number: $n
FDL editor aliases : 
select-tagged-indices-aux
select-tagged-indices-aux(P;tg;L)  ==
    rec-case(L)  of  []  =>  \mlambda{}n.[]  |  fst::rest  =>  r.if  P  fst
    then  \mlambda{}n.[<n,  tg  fst>  /  (r  (n  +  1))]
    else  \mlambda{}n.(r  (n  +  1))
    fi 
Date html generated:
2010_08_27-PM-08_45_43
Last ObjectModification:
2010_03_22-PM-06_16_34
Home
Index