Created
April 7, 2014 15:51
-
-
Save samth/10022915 to your computer and use it in GitHub Desktop.
This file contains 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 typed/racket | |
(require syntax/parse/define) | |
(define-simple-macro (for/flsum x ... (c ...) b ... e) | |
(for/fold x ... ([s 0.0]) (c ...) b ... (+ s e))) | |
(time (for/flsum : Float ([i : Positive-Fixnum (in-range 1 100000001)]) (/ 1.0 i))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment