I hereby claim:
- I am semperos on github.
- I am semperos (https://keybase.io/semperos) on keybase.
- I have a public key ASDAW-1JkM-P2_egYedl99oey9AQVwqp56R0O44Fks1BAAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| ;; === errors === | |
| (defn ^:dynamic *malformed-log-entry-error* [msg info] | |
| (throw (ex-info msg info))) | |
| ;; === restarts === | |
| (def ^:dynamic *use-value*) | |
| (def ^:dynamic *skip-log-entry*) | |
| (def ^:dynamic *reparse-entry*) | |
| ;; Low-level function |
| ;; Low-level function | |
| (defn parse-log-entry [text] | |
| (if (well-formed-log-entry? text) | |
| {:successfully-parsed text} | |
| (restart-case | |
| [:skip-log-entry (fn [] nil) | |
| :use-value (fn [value] | |
| value) | |
| :reparse-entry (fn [fixed-text] | |
| (parse-log-entry fixed-text))] |
| DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0, | |
| doc: /* Define SYMBOL as a variable, and return SYMBOL. | |
| You are not required to define a variable in order to use it, but | |
| defining it lets you supply an initial value and documentation, which | |
| can be referred to by the Emacs help facilities and other programming | |
| tools. The `defvar' form also declares the variable as \"special\", | |
| so that it is always dynamically bound even if `lexical-binding' is t. | |
| The optional argument INITVALUE is evaluated, and used to set SYMBOL, | |
| only if SYMBOL's value is void. If SYMBOL is buffer-local, its |
| (let [c__18718__auto__ (a/chan 1) | |
| captured-bindings__18719__auto__ (clojure.lang.Var/getThreadBindingFrame)] | |
| (clojure.core.async.impl.dispatch/run | |
| (fn [] | |
| (let [f__18720__auto__ (fn state-machine__18533__auto__ | |
| ([] | |
| (clojure.core.async.impl.ioc-macros/aset-all! | |
| (java.util.concurrent.atomic.AtomicReferenceArray. | |
| 7) | |
| 0 |
| (defn read-preserve! | |
| "Alter the root definition of clojure.tools.reader/read-discard to allow preserving forms that come after #_ instead of discarding them. Providing options to clojure.tools.reader/read or clojure.tools.reader/read-string in the form of `{:preserve (true|false)}` will determine whether or not forms after #_ are preserved or discarded. | |
| This allows tooling that wishes to read Clojure source to support arbitrary annotations via #_, which to normal Clojure reading will be completely discarded, but to the tool in question can be used for arbitrary purposes." | |
| [] | |
| (alter-var-root #'clojure.tools.reader/read-discard | |
| (fn [_] | |
| (fn [rdr _ opts pending-forms] | |
| (if (:preserve opts) | |
| (#'clojure.tools.reader/read* rdr true nil opts pending-forms) |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
I hereby claim:
To claim this, I am signing this object:
| (defn digits | |
| "Generate a list of digits contained in the number" | |
| [number] | |
| (loop [found-digits '() base (quot number 10) digit (rem number 10)] | |
| (let [found-digits (conj found-digits (if (neg? digit) (- digit) digit))] | |
| (if (zero? base) | |
| found-digits | |
| (recur found-digits (quot base 10) (rem base 10)))))) | |
| (defn divisible-digits |
| cmake_minimum_required(VERSION 3.2) | |
| project(SdlTutorial) | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
| set(SOURCE_FILES main.cpp) | |
| add_executable(SdlTutorial ${SOURCE_FILES} include/res_path.h include/cleanup.h) | |
| include(FindPkgConfig) | |
| pkg_search_module(SDL2 required sdl2) |