I’m interested in how List.combine is done
val combine : 'a list -> 'b list -> ('a * 'b) list
Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Which implementation of SML? MosML, MLton and SML/NJ are all open source, so you should be able to just download the source code or look at it in your browser. Actually, the MosML implementation of ListPair is here, with zip right at the top, assuming that that’s the function you were talking about. It certainly does exactly what you described.