(list-fold-left <list> <value> <procedure>)
(list-fold-right <list> <value> <procedure>)
(list-reverse <list>)
(list-for-each <list> <procedure>)
(list-for-each-with-index <list> <procedure>)
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
////////////////////////////////////////////////////////////////////// | |
// Original version in Processing: | |
// | |
// http://www.openprocessing.org/visuals/?visualID=323 | |
using system , math , ffi , GL , GLU , GLUT , glamour , vector_math ; | |
////////////////////////////////////////////////////////////////////// |
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
////////////////////////////////////////////////////////////////////// | |
using math ; | |
////////////////////////////////////////////////////////////////////// | |
sump x = case x of (a+b) = 1 ; a = 0 ; end ; | |
////////////////////////////////////////////////////////////////////// |
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
using math ; | |
////////////////////////////////////////////////////////////////////// | |
sump (x+y) = 1 ; sump x = 0 ; | |
////////////////////////////////////////////////////////////////////// | |
base (x^y) = x ; |
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
(import (rnrs) | |
(gl) | |
(glut) | |
(agave glu) | |
(agave glamour window) | |
(agave glamour misc)) | |
(initialize-glut) |
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
(library (abc) | |
(export abc) | |
(import (rnrs)) | |
(define abc 10)) |
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
(import (rnrs) | |
(only (srfi :1) iota) | |
(dharmalab misc time entry)) | |
(define (list-enumerate ls val proc) | |
(let loop ((ls ls) (return? #f) (val val)) | |
(if (or (null? ls) | |
return?) | |
val | |
(call-with-values (lambda () (proc val (car ls))) |
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
~ $ scheme --program ~/scratch/_fib-binrec-a.sps | |
(time (fib 34)) | |
no collections | |
303 ms elapsed cpu time | |
307 ms elapsed real time | |
0 bytes allocated | |
~ $ scheme --program ~/scratch/_fib-binrec-a.sps | |
(time (fib 34)) | |
no collections |
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
(library (binrec) | |
(export binrec) | |
(import (rnrs)) | |
(define (binrec f g h i j) | |
(define (fun x) | |
(if (f x) |