12345678910111213141516171819202122232425262728293031323334353637383940414243(**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*)moduleList=structincludeHack_core_listletrecfold_left_envenvl~init~f=matchlwith|[]->env,init|x::xs->letenv,init=fenvinitxinfold_left_envenvxs~init~fletrecmap_envenvxs~f=matchxswith|[]->env,[]|x::xs->letenv,x=fenvxinletenv,xs=map_envenvxs~finenv,x::xsletrev_map_envenvxs~f=letf2envinitx=letenv,x=fenvxinenv,x::initinfold_left_envenvxs~init:[]~f:f2letrecmap2_envenvl1l2~f=matchl1,l2with|[],[]->env,[]|[],_|_,[]->raise@@Invalid_argument"map2_env"|x1::rl1,x2::rl2->letenv,x=fenvx1x2inletenv,rl=map2_envenvrl1rl2~finenv,x::rlletfor_all2=List.for_all2end