Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated fizzbuzz for the new range syntax and list comprehensions.

  • Loading branch information...
commit 70cd4798a3451d4ad85e1465cc5a0b76c41c8383 1 parent a36bc45
Jeffrey Massung authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 demo/fizzbuzz.fc
10 demo/fizzbuzz.fc
View
@@ -10,8 +10,8 @@ let fizz n = if n % 3 == 0 then begin put("Fizz"), true end else false
let buzz n = if n % 5 == 0 then begin put("Buzz"), true end else false
;; the program
-let main () = for 100 do {:i |
- let f=fizz(i+1) in
- let b=buzz(i+1) in
- if not (f and b) then puts(show(i+1)) else ()
-}
+let main () =
+ for i in 1 to 100 do
+ let f=fizz(i+1) in
+ let b=buzz(i+1) in
+ if not (f and b) then puts(show(i+1)) else ()
Please sign in to comment.
Something went wrong with that request. Please try again.