Created
January 28, 2011 05:04
-
-
Save grapswiz/799856 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* x座標とy座標の組からx軸について対称な点の座標を返す *) | |
(* int * int -> int * int *) | |
let taisho_x pair = match pair with | |
(x, y) -> (x, -y) | |
let test1 = taisho_x (2, 1) = (2, -1) | |
let test2 = taisho_x (0, 5) = (0, -5) | |
let test3 = taisho_x (1, 0) = (1, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment