This file contains hidden or 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 logic.numbers | |
| (:refer-clojure :exclude [==]) | |
| (:use clojure.core.logic)) | |
| ; s is a list with a single element | |
| (defn s [x y] | |
| (conso x [] y)) | |
| ; natural_number(0). natural_number(s(X)) :- natural_number(X). | |
| (defn natural-number [x] |
This file contains hidden or 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
| -- name: get_cools | |
| SELECT * | |
| FROM cools | |
| -- name: insert_a_cool | |
| INSERT INTO cools | |
| (name, why) | |
| VALUES | |
| (?, ?) | |
| RETURNING level |
This file contains hidden or 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 pondering | |
| (:require-macros [cljs.core.async.macros :refer [go go-loop]]) | |
| (:require [cljs.core.async :refer [<! >! put! take! close! chan timeout]])) | |
| ; The "library" part | |
| (def unique (atom 0)) | |
| (def id-channel (atom {})) | |
| (def output (chan)) | |
| (def input (chan)) |