code: func Filter(p, xs interface{}) interface{} {
  	chk := ty.Check(
  		new(func(func(ty.A) bool, []ty.A) []ty.A),
  		p, xs)
  	vp, vxs, tys := chk.Args[0], chk.Args[1], chk.Returns[0]
  
  	xsLen := vxs.Len()
  	vys := reflect.MakeSlice(tys, 0, xsLen)
  	for i := 0; i < xsLen; i++ {
  		vx := vxs.Index(i)
  		if call1(vp, vx).Bool() {
  			vys = reflect.Append(vys, vx)
  		}
  	}
  	return vys.Interface()
  }
docs: // Filter has a parametric type:
  //
  //	func Filter(p func(A) bool, xs []A) []A
  //
  // Filter returns a new list only containing the elements of `xs` that satisfy
  // the predicate `p`.