Lines Matching defs:bind
636 fun bind (v as Fv _) vmap k = k (lookup v vmap)
637 | bind (Comb(M,N)) vmap k = bind M vmap (fn m =>
638 bind N vmap (fn n => k (Comb(m,n))))
639 | bind (Abs(v,M)) vmap k = bind M (increment vmap)
641 | bind (t as Clos _) vmap k = bind (push_clos t) vmap k
642 | bind tm vmap k = k tm
644 rev_itlist (fn v => fn M => f(Abs(v,M))) rvlist (bind tm varmap I)
653 let fun bind (v as Fv _) i = if v=Bvar then Bv i else v
654 | bind (Comb(Rator,Rand)) i = Comb(bind Rator i, bind Rand i)
655 | bind (Abs(Bvar,Body)) i = Abs(Bvar, bind Body (i+1))
656 | bind (t as Clos _) i = bind (push_clos t) i
657 | bind tm _ = tm (* constant *)
659 Abs(Bvar, bind Body 0)
856 else MERR ("double bind on variable "^