view lib/ur/listPair.ur @ 814:3f3b211f9bca

Fix argument ordering bug in fuse; fix case subsitution bug in MonoReduce
author Adam Chlipala <adamc@hcoop.net>
date Sun, 17 May 2009 14:36:55 -0400
parents 5f49a6b759cb
children 78504d97410b
line wrap: on
line source
fun mapX (a ::: Type) (b ::: Type) (ctx ::: {Unit}) f =
    let
        fun mapX' ls1 ls2 =
            case (ls1, ls2) of
                ([], []) => <xml/>
              | (x1 :: ls1, x2 :: ls2) => <xml>{f x1 x2}{mapX' ls1 ls2}</xml>
              | _ => error <xml>ListPair.mapX: Unequal list lengths</xml>
    in
        mapX'
    end