This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require | |
| racket/gui mrlib/gif pict) | |
| (define (fourier-sample θ zs) | |
| (for/sum ([(z t) (in-indexed (in-list zs))]) | |
| (* z (exp (* t θ))))) | |
| ; discrete forward fourier transform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang info | |
| (define collection "knitting") | |
| (define deps '("base" "threading")) | |
| (define build-deps '("rackunit-lib")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require (for-syntax | |
| syntax/parse | |
| syntax/parse/lib/function-header | |
| racket/syntax | |
| (only-in | |
| racket/list make-list))) | |
| (provide choose) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require racket/generic) | |
| ;; adapted from: | |
| ;; https://eli.thegreenplace.net/2010/01/02/top-down-operator-precedence-parsing/ | |
| ;; left-binding power property | |
| (define-values (prop:lbp has-lbp? lbp) | |
| (make-struct-type-property/generic |