Skip to content

Instantly share code, notes, and snippets.

(define (solve grid)
(let ([result (fill-allowed grid)])
(if (equal? grid result)
result
(solve result))))
; Finds the allowed digits for each cell in the grid,
; and if there's only one choice, fills it in.
(define (fill-allowed grid)
(for/list ([r (in-range 1 10)])
@goderich
goderich / pig-latin
Created November 17, 2018 16:42
A small program that takes a word (String) as input and translates it into Pig Latin
use std::io;
fn main() {
let mut input = String::new();
io::stdin().read_line(&mut input)
.expect("Failed to read line");
println!("{}", piglatinize(&input));
}
fn piglatinize(s: &str) -> String {
import argparse
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument('file', help='A .doc or .docx file to open')
args = parser.parse_args()
class DocError(Exception):
'''Errors for non-Word type files'''
pass