Skip to content

Instantly share code, notes, and snippets.

Jerry James jerry-james

Block or report user

Report or block jerry-james

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
View gist:145d80ea4c691805da1496dc5c5b0529
List<Cave> unplacedCaves = ...;
List<Cave> placedCaves = new ArrayList<>();
for(Cave caveToPlace: unplacedCaves) {
Cave parent = placedCaves
.filter(cave -> cave.hasVacancy())
View sewpr.v
Definition relation (X: Type) := X -> X -> Prop.
(* 1.1 *)
Inductive B : Set :=
| t : B
| f : B
| or : B -> B -> B.
Check B.
Check t.
View gist:137374032efe9c0418d3c34570bd734f
#lang racket/gui
(module+ test
(require rackunit))
(define (exact/sqrt n) (inexact->exact (sqrt n)))
(define exact/pi (inexact->exact pi))
(define shape%
(class object%
(init-field origin)
View gist:8a8139b7239069a76c7de3511101e80f
#lang racket
; working thru
(require racket/trace)
(module+ test
(require rackunit))
(struct e-quote (value) #:prefab)
(define (atom? e) (not (pair? e)))
View gist:05bd535c7ac1b001aafce38a33f47218
Fixpoint nonzeros (l:natlist) : natlist
match l with
| nil => nil
| h :: t => match h with
| 0 => nonzeros t
| _ => h :: nonzeros t
View gist:c13772df99c5059089e146633e2dba38
<Label text="Level" GridPane.columnIndex="0" GridPane.rowIndex="0" />
<ComboBox fx:id="levelComboBox" GridPane.columnIndex="1" GridPane.rowIndex="0">
<Integer fx:value = "0"/>
<Label text="Strength" GridPane.columnIndex="0" GridPane.rowIndex="1" />
<ComboBox value = "0" fx:id="strengthComboBox" GridPane.columnIndex="1" GridPane.rowIndex="1">
You can’t perform that action at this time.