Ignore:
Timestamp:
Dec 2, 2011, 7:49:19 PM (8 years ago)
Author:
tranquil
Message:

fighting with a bug of the translation from RTL to ERTL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/utilities/miscPottier.ml

    r1584 r1585  
    44  List.map f' (List.combine (List.combine al bl) cl)
    55
    6 let fold3_right f al bl cl =
    7   let f' ((a, b), c) d = f a b c d in
    8   List.fold_right f' (List.combine (List.combine al bl) cl)
     6let rec fold3_right f al bl cl d = match al, bl, cl with
     7  | a :: al, b :: bl, c :: cl ->
     8    f a b c (fold3_right f al bl cl d)
     9  | [], [], [] -> d
     10  | _ -> invalid_arg "fold3_right: list lengths do not match"
     11
     12let rec fold3_left f a bl cl dl = match bl, cl, dl with
     13  | b :: bl, c :: cl, d :: dl ->
     14    fold3_left f (f a b c d) bl cl dl
     15  | [], [], [] -> a
     16  | _ -> invalid_arg "fold3_left: list lengths do not match"
    917
    1018let rec max_list = function
Note: See TracChangeset for help on using the changeset viewer.