-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
648dc6c
commit 66df79e
Showing
3 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
open Joy.Shape | ||
open Joy.Shape | ||
|
||
(* | ||
demonstration of the repeat function | ||
takes n, an operation, and an initial shape, and applies the operation | ||
iteratively to the initial shape n times | ||
adapted from the original Joy python library's examples | ||
(* | ||
demonstration of the repeat function | ||
takes n, an operation, and an initial shape, and applies the operation | ||
iteratively to the initial shape n times | ||
adapted from the original Joy python library's examples | ||
*) | ||
|
||
let () = | ||
init (); | ||
let circle = circle ~x: (-100) ~y: 0 50 in | ||
let shapes = repeat 10 (translate 10 0) circle in | ||
let circle = circle ~x:(-100) ~y:0 50 in | ||
let shapes = repeat 10 (translate 10 0) circle in | ||
render_shape shapes; | ||
close (); | ||
close () |
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