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 can-sum-to-zero | |
([nums] | |
(can-zero nums #{})) | |
([nums can-sum-to] | |
(when (seq nums) | |
(let [num (first nums)] | |
(if (can-sum-to (- num)) | |
true | |
(let [can-also-sum-to (map #(+ num %) can-sum-to)] | |
(recur (rest nums) |
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 sudoku | |
(:refer-clojure :exclude [==]) | |
(:use [clojure.core.logic]) | |
(:require [clojure.core.logic.fd :as fd])) | |
(defn init-board [vars puzzle] | |
(matche [vars puzzle] | |
([[] []] | |
succeed) |
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
<html> | |
<head> | |
<title>TEST</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
</head> | |
<body> | |
Bitcoin price is <b id="price">--</b> | |
<script> | |
$(function(){ | |
$.get("https://data.mtgox.com/api/1/BTCUSD/ticker", function(data) { |