Last active
February 18, 2019 07:12
-
-
Save psyllo/f35fb66c68e8d1eb6912a9da099fe26c to your computer and use it in GitHub Desktop.
An Elisp function to calculate Wendler 5/3/1 main lift weights and reps given a week number and 1RM.
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 wendler (week one-rm) | |
(let ((one-rm (* one-rm 0.9))) | |
(if (eq week 4) | |
(mapcar (lambda (n) | |
(format "%0.2fx5" n)) | |
(list (* one-rm 0.4) | |
(* one-rm 0.5) | |
(* one-rm 0.6))) | |
(let ((pct (+ 0.6 (* week 0.05))) | |
(reps (cond ((eq week 1) '(5 5 5)) | |
((eq week 2) '(3 3 3)) | |
((eq week 3) '(5 3 1)) | |
((eq week 4) '(5 5 5))))) | |
(list (format "%0.2fx%d" (* one-rm pct) (nth 0 reps)) | |
(format "%0.2fx%d" (* one-rm (+ pct 0.1)) (nth 1 reps)) | |
(format "%0.2fx%d+" (* one-rm (+ pct 0.2)) (nth 2 reps))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment