Created
October 17, 2019 02:16
-
-
Save TomLisankie/9ded5d1a69f416a6bddc0bbd0862e4d2 to your computer and use it in GitHub Desktop.
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
;; Problem 46 | |
(fn [f] | |
(fn [& args] | |
(apply f (reverse args)))) | |
;; Problem 44 | |
(fn [number coll] | |
(if (> number 0) | |
(concat (second (split-at (mod (+ (count coll) number) (count coll)) coll)) (first (split-at (mod (+ (count coll) number) (count coll)) coll))) | |
(concat (second (split-at (mod (- (+ (count coll) 1) number) (count coll)) coll)) (first (split-at (mod (- (+ (count coll) 1) number) (count coll)) coll))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment