Hi. I've discovered that [List.mapPartial] reverses the list.
Probably, it is not what user wants from function named [map*]. Should
we do the [reverse] before returning the final list to user?

Regards,
Sergey

PS  the code

fun mapPartial [a] [b] f =
    let
        fun mp' acc ls =
            case ls of
                [] => rev acc
              | x :: ls => mp' (case f x of
                                    None => acc
                                  | Some y => y :: acc) ls
    in
        mp' []
    end

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to