Skip to content

Instantly share code, notes, and snippets.

@shirok
Created October 1, 2014 02:04
Show Gist options
  • Save shirok/700ddd9ff7f297d952db to your computer and use it in GitHub Desktop.
Save shirok/700ddd9ff7f297d952db to your computer and use it in GitHub Desktop.
(define-library (scheme linear-algebra)
(import (rename (scheme base) (* r7rs:*)))
(export *)
(begin
(define (* x y)
(if (or (array? x) (array? y))
(array-multiplication x y)
(r7rs:* x y)))
(define (array? obj) ...)
(define (array-multiplication x y) ...)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment