Skip to content

Instantly share code, notes, and snippets.

JP Verkamp jpverkamp

Block or report user

Report or block jpverkamp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jpverkamp / functional-list.rkt
Created Oct 9, 2013
Re-implementing basic list functionality using functions as the storage mechanism.
View functional-list.rkt
#lang racket
; Empty list
(define empty (λ (l) (l 'error 'error #t)))
(define empty? (λ (l) (l (λ (a d e) e))))
; Build and take apart lists
(define pair (λ (a d) (λ (l) (l a d #f))))
(define first (λ (l) (l (λ (a d e) a))))
(define rest (λ (l) (l (λ (a d e) d))))
jpverkamp /
Last active Dec 16, 2015
Average value and success chance for d4 + wild in Savage worlds
import random
# Roll an n-sided die
def d(n):
return random.randint(1, n)
# Roll an n-sided die, exploding on maximum value
def e(n):
total = 0
while True:
You can’t perform that action at this time.