C'est ce que j'ai jusqu'ici.Comment renvoyez-vous plusieurs valeurs et attribuez-les à des variables mutables?
let Swap (left : int , right : int) = (right, left)
let mutable x = 5
let mutable y = 10
let (newX, newY) = Swap(x, y) //<--this works
//none of these seem to work
//x, y <- Swap(x, y)
//(x, y) <- Swap(x, y)
//(x, y) <- Swap(x, y)
//do (x, y) = Swap(x, y)
//let (x, y) = Swap(x, y)
//do (x, y) <- Swap(x, y)
//let (x, y) <- Swap(x, y)
J'apprends python et imaginer comment # frais F pourrait être si nous permettons: 'a, b <- b, a', 'x. [a], x. [b] <- x [b], x [a]' De sorte que 'swap' n'est plus nécessaire. – colinfang