Skip to content

Instantly share code, notes, and snippets.

@soegaard
Last active December 16, 2015 15:09
Show Gist options
  • Select an option

  • Save soegaard/5454068 to your computer and use it in GitHub Desktop.

Select an option

Save soegaard/5454068 to your computer and use it in GitHub Desktop.
#lang racket
(define (ε i j k)
(* (- i j) (- j k) (- k i) 1/2))
(define (cross-product v w)
(define ref vector-ref)
(for/vector ([i 3])
(for*/sum ([j 3] [k 3])
(* (ε i j k) (ref v j) (ref w k)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment