Created
September 6, 2013 06:11
-
-
Save slimane/6460139 to your computer and use it in GitHub Desktop.
common lispでのBMI計算コード。私新しい言語勉強したらとりあえずこれ書くんです。
This file contains hidden or 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
(defun calc_bmi (height weight) | |
(float | |
(flet ( | |
(twice (number) | |
(* number number)) | |
(divid-100(number) | |
(/ number 100)) | |
) | |
(/ | |
weight | |
(twice | |
(divid-100 height)) | |
) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment