QuickCheck
is a language for stating properties of programs.
?FORALL(X, nat(), X*X >= 0)
[("-f" "--flag") => (λ (flag arg1 arg2 ...) (do-stuff ...)) '("Command description." "arg1 description" "arg2 description" ...)] |
(find-system-path 'run-file) |
(define (find-git-dirs path) | |
(define (basename path) | |
(let-values ([(base name must-be-dir?) (split-path path)]) | |
(match name | |
['same (string->path ".")] | |
['up (string->path "..")] | |
[name name]))) | |
(define .git (string->path ".git")) | |
(find-files | |
(λ (path) |
Patch mode allows you to stage parts of a changed file, instead of the entire file. This allows you to make concise, well-crafted commits that make for an easier to read history. This feature can improve the quality of the commits. It also makes it easy to remove parts of the changes in a file that were only there for debugging purposes - prior to the commit without having to go back to the editor.
It allows you to see the changes (delta) to the code that you are trying to add, and lets you add them (or not) separately from each other using an interactive prompt. Here's how to use it:
from the command line, either use
open SCaml;; | |
type amount = tz;; | |
type dest = unit contract;; | |
type threshold = nat;; | |
type keys = key list;; | |
type action = | |
| Transfer of amount * dest | |
| Change_keys of threshold * keys |
open SCaml | |
type action = | |
| Transfer of {amount: tz; dest: unit contract} | |
| Delegate of key_hash option | |
| ChangeKeys of {threshold : nat; keys : key list} | |
type parameter = | |
{counter: nat; action: action; sigs : signature option list} |
import socket | |
import threading | |
import re | |
import time | |
class ircOutputBuffer: | |
# Delays consecutive messages by at least 1 second. | |
# This prevents the bot spamming the IRC server. | |
def __init__(self, irc): | |
self.waiting = False |
;; Peter Norvig - Programming Challange from Erann Gat: | |
;; http://www.flownet.com/ron/papers/lisp-java/ | |
;; Given a list of words and a list of phone numbers, find all the ways that | |
;; each phone number can be expressed as a list of words. | |
;; Run: (main "word-list-file-name" "phone-number-file-name") | |
(defvar *dict* nil | |
"A hash table mapping a phone number (integer) to a list of words from the | |
input dictionary that produce that number.") |