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
<?php | |
/** | |
* Plugin Name: Give - Free | |
**/ | |
/** | |
* Register our plugin so it shows up as an option in the Give gateway settings | |
*/ | |
add_filter( 'give_payment_gateways', function() { | |
// Here replace 'give_free' with a unique slug for your plugin. You will use this slug throughout this plugin. |
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
(defn multiple-trials [m n] | |
( loop [m m acc []] | |
(if (> m 0) | |
(recur (dec m) (conj acc (compute-winnings-for-a-trial n))) | |
acc))) |
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
; This gist relates to Misophistful's video "Understanding list comprehension in Clojure" | |
; http://www.youtube.com/watch?v=5lvV9ICwaMo | |
(defn palindrome? [n] | |
(let [s (str n)] | |
(= s (clojure.string/reverse s)))) | |
(def palindromes | |
(for [n1 (range 100 1000) | |
n2 (range 100 1000) |