This file contains 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
(ns core | |
(:require | |
[clojure.string :as string])) | |
(def max-per-color | |
{"red" 12 | |
"green" 13 | |
"blue" 14}) | |
(defn convert-it [input] |
This file contains 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
(ns core | |
(:require | |
[clojure.string :as string])) | |
;;day 1 | |
(defn string->arr-of-chars [string] | |
(mapv (fn [character] (Character/getNumericValue character)) string)) | |
(defn remove-non-integers [arr-of-chars] | |
(remove (fn [n] (> n 9)) arr-of-chars)) |
This file contains 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
function assert(condition, message) { | |
if (condition) console.log(message) | |
else console.log('Assertion failed') | |
} | |
var text = 'Ricky!' | |
function useless(ninjaCallback) { | |
console.log('Inside USELESS function') | |
return ninjaCallback() |
This file contains 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
(defn weird-rotate [first-item before-seq after-seq counter] | |
(cond | |
;; there is only one item | |
(and | |
(not (seq before-seq)) | |
(not (seq after-seq))) | |
(list first-item) | |
;;end of the line for either | |
(and (> counter 0) (not (seq before-seq))) |
This file contains 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
<localleader>ls | |
Open the log buffer in a new horizontal split window. | |
<localleader>lv | |
Open the log buffer in a new vertical split window. | |
<localleader>lt | |
pen the log buffer in a new tab. | |
<localleader>le |