Skip to content

Instantly share code, notes, and snippets.

@TomLisankie
Created October 17, 2019 02:16
Show Gist options
  • Save TomLisankie/9ded5d1a69f416a6bddc0bbd0862e4d2 to your computer and use it in GitHub Desktop.
Save TomLisankie/9ded5d1a69f416a6bddc0bbd0862e4d2 to your computer and use it in GitHub Desktop.
;; 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