Skip to content

Instantly share code, notes, and snippets.

@fbiville
Created January 11, 2014 13:37
Show Gist options
  • Save fbiville/8371036 to your computer and use it in GitHub Desktop.
Save fbiville/8371036 to your computer and use it in GitHub Desktop.
Can you guess what it does? (Improvement suggestions are welcome ofc)
(fn mysteryFunction [s]
((fn append [mySeq acc]
(let [beginning (butlast mySeq)]
(if (= beginning nil)
(conj acc (first mySeq))
(append beginning (conj acc (last mySeq)))
)
)
) s [])
)
@fbiville
Copy link
Author

(some obvious Clojure.core functions were not allowed for this exercise ;-)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment