Parsing with clojure.spec for the Advent of Code

综合编程 2016-12-09 阅读原文

09 Dec 2016

Advent of Code
is a series of code challenges in the form of an advent calender, counting down to Christmas. The challenges have inputs in the form of strings. Clojure.spec can be used to parse those inputs and turn them into useful data. The gist below works through some examples:

责编内容by:thegeez blog 【阅读原文】。感谢您的支持!

您可能感兴趣的

自制语言初试 – 入lang Rationale(为毛要整一门语言) ClojureScript怎么就不好了 接上篇简单的介绍sweet.js之后, 萌发了特别crazy的idea. 如果CoffeeScript或者...
A DSL for Music Haskell School of Music I recently discovered Haskell School of Music. It’s a book about algorithmic music, which is a...
A wiki made with Clojure, yada and Datomic Client 04 Jan 2017 At EuroClojure in Bratislava an unconference session was about Clojure and REST. At this session Liberato...
(cljs/run-at (JSVM. :browser) “命名空间就这么简单R... 前言 一个cljs文件定义一个命名空间,通过命名空间可以有效组织代码,这是构建大型系统必备的基础设施。本篇我们就深入理解cljs中的命名空间吧! 好习惯从"头"开始 每个cljs文件首行非注释的内容必定如下 (ns my-p...
Clojure 运行原理之编译器剖析 | Keep Writing Codes... Clojure is a compiled language, yet remains completely dynamic — every feature supported by Clojure is supported at runt...