Skip to content

Instantly share code, notes, and snippets.

@Jabbslad
Last active December 22, 2015 16:49
Show Gist options
  • Save Jabbslad/6501899 to your computer and use it in GitHub Desktop.
Save Jabbslad/6501899 to your computer and use it in GitHub Desktop.

Revisions

  1. Jabbslad revised this gist Sep 9, 2013. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion 4clojure.clj
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,10 @@
    ; 43: Write a function which reverses the interleave process into x number of subsequences.

    (fn [coll n]
    apply map list (partition n coll))
    (apply map list (partition n coll)))

    ; 66: Given two integers, write a function which returns the greatest common divisor.
    (fn [x y]
    (if (= y 0) x
    (recur y (rem x y))))

  2. Jabbslad created this gist Sep 9, 2013.
    4 changes: 4 additions & 0 deletions 4clojure.clj
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    ; 43: Write a function which reverses the interleave process into x number of subsequences.

    (fn [coll n]
    apply map list (partition n coll))