Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] View of /trunk/sml3d/examples/bounce/simulate.sml
ViewVC logotype

View of /trunk/sml3d/examples/bounce/simulate.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (download) (annotate)
Tue Sep 30 07:54:18 2008 UTC (10 years, 10 months ago) by jhr
File size: 542 byte(s)
repository restructuring
(* simulate.sml
 *
 * COPYRIGHT (c) 2006 John Reppy (http://www.cs.uchicago.edu/~jhr)
 * All rights reserved.
 *)

structure Simulate : sig

    type time = GL.double
    type state

    val initState : unit -> state
    val newBall : (state * time) -> unit
    val run : (state * time) -> unit

  end = struct

    type time = GL.double

    datatype state = ST of {
	balls : Ball.ball list ref
      }

    fun initState () = ST{balls = ref[]}

    fun newBall (ST{balls, ...}, t) = balls := Ball.new t :: !balls

    fun run t = ()

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0